Hacker News new | past | comments | ask | show | jobs | submit login

I get this sentiment a lot ...

     Secondly, it is the ultimate language to date for writing libraries 
     and  embedded DSL’s with static types. ... These abilities go 
     way beyond any prior statically typed language.
The author conveniently left out dynamic languages; but regardless of that, I don't like Scala because:

1) you can't override the method dispatching mechanism to make use of those types in interesting ways (e.g. multimethods are possible with DLR in .NET)

2) You can't get the syntax-tree of a block of code, then recompile it to something else (e.g. LINQ - and F# supports this as a general construct). There was a compiler-plugin at some point, but it's deprecated and incomplete and full of bugs

3) All OOP languages should have optional dynamic typing; OOP just doesn't blend with static types, being one reason why Haskell is not OOP (while providing other similar tools for polymorphism)

What you do get in Scala is a flexible syntax, that can lead to awkward behavior (I often find myself asking whether some line needs a semicolon). And the type-system, while better than the one in Java, is also too complex, too verbose and definitely not elegant.

You know what would be elegant? Being able to test if some object is an instance of List[String] (and yes, I know about manifests and implicit parameters: it's still an ugly hack that doesn't solve all problems).

One could say that Scala is a pragmatic language, but so is C++; and C++ has no replacement, while Scala does have many.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: