Good post. I didn't know about @switch.
Nice post . Enjoyed it. I read too fast J. Suereth book and forgot about the @switch.
thanks for the interesting post, I didn't know about @switch either. As a commenter on the blog noted, using the collections part of google's guava libs can ease a lot of the pain. Since the static methods in Iterables (http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/com/google/common/collect/Iterables.html -- esp. transform and filter) produce lazy results, they even act a bit like generators in python. Obviously the syntax is nowhere near as nice, but if you create a bunch of factory methods for the Predicates and Functions, you can get pretty decent code.
Add a comment...