Hacker News new | ask | show | jobs
by rdouble 4871 days ago
Haskell's syntax is weird compared to more popular languages. This is the main reason it's hard.

That said, It's a better choice than Scala for math. However, if the math is numerical algorithms, Python is better than either Haskell or Scala.

I'm not sure why they need to settle on one language. Seems like painting the bike shed. For better or worse, every sufficiently large web system has a number of languages being used behind the scenes.

1 comments

Syntax is by far the most superficial difference. If you're going to actually use functional programming, the trick will be learning the paradigm and not worrying about syntax. In fact, from that perspective, I think Haskell syntax actually wins out: it's extremely simple and very well-suited to functional programming. I found things like curried functions and recursion much easier to grasp and use in Haskell than in Scheme when I was learning both simultaneously.

I certainly do not think that syntax is anywhere near why some people find Haskell hard to pick up. Thanks to pattern matching, the syntax is very visual and thanks to having relatively few forms and keywords, it's much simpler than most imperative languages'.

Also, I'm not suggesting necessarily using Haskell exclusively, by any means; I just want more people to consider it at all!

Well, I'm still not so sure. I've been doing functional programming for 20 years and I thought Haskell syntax was weird.
I find Haskell's syntax very attractive. It is the same style in which one would express domains and operations on a whiteboard.