Why I love everything you hate about Java « Magic Scaling Sprinkles
january 2012 by rcrowley
Great case for dependency injection but I think it's mistaken to think that Java's the only way to get there.
java
designpatterns
scala
programming
january 2012 by rcrowley
nkallen/querulous - GitHub
january 2012 by rcrowley
Scala SQL library that loves the factory pattern and dependency injection.
scala
sql
designpatterns
january 2012 by rcrowley
The Point of Pattern Matching in Scala
august 2011 by rcrowley
Odesky on Scala, pattern matching, and the expression problem:
"So the right tool for the job really depends on which direction you want to extend. If you want to extend with new data, you pick the classical object-oriented approach with virtual methods. If you want to keep the data fixed and extend with new operations, then patterns are a much better fit. There's actually a design pattern—not to be confused with pattern matching—in object-oriented programming called the visitor pattern, which can represent some of the things we do with pattern matching in an object-oriented way, based on virtual method dispatch. But in practical use the visitor pattern is very bulky. You can't do many of the things that are very easy with pattern matching. You end up with very heavy visitors. And it also turns out that with modern VM technology it's way more innefficient than pattern matching. For both of these reasons, I think there's a definite role for pattern matching."
scala
"So the right tool for the job really depends on which direction you want to extend. If you want to extend with new data, you pick the classical object-oriented approach with virtual methods. If you want to keep the data fixed and extend with new operations, then patterns are a much better fit. There's actually a design pattern—not to be confused with pattern matching—in object-oriented programming called the visitor pattern, which can represent some of the things we do with pattern matching in an object-oriented way, based on virtual method dispatch. But in practical use the visitor pattern is very bulky. You can't do many of the things that are very easy with pattern matching. You end up with very heavy visitors. And it also turns out that with modern VM technology it's way more innefficient than pattern matching. For both of these reasons, I think there's a definite role for pattern matching."
august 2011 by rcrowley