1 like
·
602 reads
2 comments
·Sep 9, 2022
Sep 9, 2022
Self Type as Dependency
Have you used this in the wild? It seems interesting, but not sure when I would use it. Perhaps if I don't control the Vehicle
trait, but I want to extend it? But Scala has Extension Methods to do this as well. When should I use one or the other? I haven't had to use Extension Methods either. Perhaps this is more for building Libraries and not Applications?
Self Type as Tagging
This remind me a lot of var that = this;
in JavaScript haha, brings me back. :-)
·
·1 reply
Author
·Sep 16, 2022
Hey Nick F, Self Type as a dependency is widely used in Scala libraries. Overusing it can make it a pain. This is how "cake pattern" is implemented.
·