Learning Haskell with a view to learning Scala

前端 未结 6 771
花落未央
花落未央 2021-01-31 07:57

I\'ve read a few questions such as Scala vs Haskell discussing the merits of both languages or which to learn, but I already know that I\'d like to learn Scala. I was a Java pro

6条回答
  •  天涯浪人
    2021-01-31 08:35

    The risk of starting directly from Scala, without having played any purely functional programming language first, is that you'll probably be drawn to the procedural solutions a bit too often.

    I wouldn't try Haskell as an intro to functional programming, though: not that it's particularly hard - its syntax is amazingly terse - but it's definitely very peculiar (even in the peculiar world of functional programming) and I think you should try with a language you can port more easily to Scala, like Racket or plain Scheme.

    To better understand what I mean, look at list comprehensions in Haskell, Scala and Scheme.

提交回复
热议问题