Re:Portrait of a N00b
by jimbokun on Monday February 11, 2008 @10:44AM
(#113378)
I'm curious to hear replies from people experienced with Scala, Haskell, or other static-functional languages.
I've looked at Scala, and type inference seems like it would be a big win compared to declare-every-type languages like Java. (I haven't written Scala programs so I don't know for sure.) I haven't learned Haskell, but I get turned off by the school-marm "statefulness is sin" attitude. I like that Lisps generally push you in the direction of good functional programming style without preventing you from doing imperative, or OO, or whatever style you think matches your particular problem best.
However, what the static-functional languages seem to have going for them is giving the compiler more to work with to improve performance. Scala and Haskell seem to do well on benchmark tasks. And, despite being turned off by Haskell's draconian enforcement of pure-functional programming, I was impressed when I saw that you could enable parallelization with a simple annotation on the section of code you wanted to run concurrently. Of course, Erlang fits this as well, but I think is not nearly as fast as Haskell for sequential code perhaps due to lack of static typing.
I admire SBCL for the performance they get out of Common Lisp. I've heard they do good type inferencing even on dynamically typed code, and of course Common Lisp has optional type declarations that the compiler can use to speed things up.
So, it appears that strong static typing might enable compilers that emit faster code. What do you all think?
I've looked at Scala, and type inference seems like it would be a big win compared to declare-every-type languages like Java. (I haven't written Scala programs so I don't know for sure.) I haven't learned Haskell, but I get turned off by the school-marm "statefulness is sin" attitude. I like that Lisps generally push you in the direction of good functional programming style without preventing you from doing imperative, or OO, or whatever style you think matches your particular problem best.
However, what the static-functional languages seem to have going for them is giving the compiler more to work with to improve performance. Scala and Haskell seem to do well on benchmark tasks. And, despite being turned off by Haskell's draconian enforcement of pure-functional programming, I was impressed when I saw that you could enable parallelization with a simple annotation on the section of code you wanted to run concurrently. Of course, Erlang fits this as well, but I think is not nearly as fast as Haskell for sequential code perhaps due to lack of static typing.
I admire SBCL for the performance they get out of Common Lisp. I've heard they do good type inferencing even on dynamically typed code, and of course Common Lisp has optional type declarations that the compiler can use to speed things up.
So, it appears that strong static typing might enable compilers that emit faster code. What do you all think?