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

>People who've taken Haskell or even Scala into prime-time production are extremely rare.

Not that rare, actually. I have a hard time finding companies that want to use Scala.



I currently write Scala at work. As far as I can tell, it's a lot like C or C++, except that you have to use while loops instead of for loops and you have to perform unholy incantations to fake arrays of structs. If you don't do this, you can either try to allocate a few hundred million tuples and OutOfMemoryError, or you can allocate one array of a primitive for each field of the struct and give up on the idea of having decent cache locality. It's less capable of TCO than gcc, which is pretty hilarious for a functional programming language. Generic programming in Scala is lots of fun until you try to use an Ordering[Double] or an ArrayBuffer[Double] in a critical path.

Manageable parallelism is nice, though.


Almost every problem you mention is a problem of the underlying runtime. Are you sure you bash the right thing?


This is true. The only things that are trivial to fix are the absence of for loops and the use of ArrayBuffer[AnyRef] to implement ArrayBuffer[Double]. It might also be possible to make TCO of mutually recursive final methods work, but it's probably more trouble than it's worth.


Aren't for loops already fixed since months? (see https://github.com/scala/scala/commit/4cfc633fc6cb2ab0f473c2...)

Regarding ArrayBuffer: It is not as easy as it looks like, because of the conflicting nature of Arrays vs. Generics (yet another JVM problem). Amusingly I tried using Manifests to do exactly that last week. I hit the wall because the Manifests seemed to spread arbitrarily. Will try with TypeTags/macros when they become available.


I'm glad to learn that they're fixed for Range. Thanks.


Matching problem. Hard to find jobs in good languages, because they're rare. Hard to hire in good languages, because the people are rare. Fuck Java/C++.




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

Search: