Solutions

Hver dag bruker millioner av mennesker løsninger som er laget av Knowit Solutions. Vi som jobber her er sultne på å lære og liker å dele kompetansen vår – både med kolleger og omverdenen.

Solutions

Scala Dependency Injection Cakepattern

A Cake for Kotlin Part 3: Compiler performance in Scala

In the first article in this series, I presented my motivation for wanting to do dependency injection inspired by the Cake Pattern in Kotlin (and other languages without self-types), despite the known issues with that style of coding. I presented a way of doing so that I believe will allow coders to keep the good things from the Cake, while avoiding some of the problems. In the second article, I presented a larger example of what a program written in this style would look like.


Dependency Injection Kotlin Cakepattern

A Cake for Kotlin part 2: Making an example of Arithmetic

In the first article in this series, I explained my motivation for wanting to do dependency injection inspired by the Cake Pattern in Kotlin (and other languages without self-types), despite the known issues with that style of coding. I presented a way of doing so that I believe will allow programmers to keep the good things from the Cake, while avoiding some of the problems. The examples in that article, however, were extremely small. Let’s create a (slightly) bigger one and look at some more code.