It’s 2015. Most of the new popular languages are more or less functional. The old ones, like Java, gain functional programming elements. In Scala, people are increasingly leaning towards the … Continue Reading →
Category Archives: Object oriented
Using Scala traits as modules, or the “Thin Cake” Pattern
I would like to describe a pure-Scala approach to modularity that we are successfully using in a couple of our Scala projects. But let’s start with how we do Dependency … Continue Reading →
MacWire 0.2: Scopes are simple!
MacWire generates new instance creation code of given classes, using values in the enclosing type for constructor parameters, with the help of Scala Macros. DI container replacement. Version 0.2 has … Continue Reading →
MacWire 0.1: Framework-less Dependency Injection with Scala Macros
Using Dependency Injection is almost a standard when developing software. However, in many cases it may seem that using the pattern implicates using a DI container/framework. But is a framework … Continue Reading →
Dry parameter names
How often do you see code like this, especially when using dependency injection, single-responsibility principle, and other “good practices”? 1 2 3 4 5 class FriendsTimelineReader(userFinder: UserFinder, userStatusReader: UserStatusReader, statusSecurityFilter: … Continue Reading →
Missing OO and FP bridge in Scala
Scala blends functional and object-oriented programming in many nice ways. You can use both FP an OO-like constructs whichever fits the current problem better. But there’s always room for improvement! … Continue Reading →