Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When I get a compiler error in Scala it's almost always something that would cause a runtime error in a non statically typed language. The downside is that the error messages can be difficult to parse and resolve for beginners. Once I got over the learning curve, I realized that in almost all cases the compiler was trying to tell me something very useful. I do get a little annoyed at all the Haskell/OCaml type nerds trying to do things with the type system that are not particularly practical, for instance: http://apocalisp.wordpress.com/2010/06/16/type-level-program...


Annoyed? These are just fun things to do. Just like Quines. Of course anyone trying to introduce type-level computations into production code should be shot on sight (unless you're using a language where type-level "computations" are somehow expected... like Haskell), but that doesn't mean we shouldn't do it just for amusement. Just as the linked article ends: "Match is the only operation that we need for HLists. We’ll continue by defining comparisons, addition, multiplication, modulus, and exponentiation just for fun anyway."


It's not really any different from C++ nerds doing the same with the template system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: