22 April 2016 / Bartosz Kowalik

ScalaMock: macros strike back

, ,


Introduction ScalaMock is a powerful mocking library written purely in Scala. It uses macros to create mocks. Macros and compile-time reflection allow to create type safe code or manipulate programs. It is almost mythological tool, the Holy Grail of programming languages. Almost all modern languages have it. All features of ScalaMock are listed on its […]

Read more

16 October 2015 / Bartosz Kowalik

Vals gotcha!


Immutability in Scala is great. A lot of concerns go away when you use it, but those that remain are not so clear to reason about. Look at the code below: My question is: what is the value of expression (new Bar).b? In this post I will explain why it is neither 1 nor 2. […]

Read more