4 ms·
The syntax is not the problem for Haskell gaining acceptance for web dev. Most web devs are frightened by functional programming idioms and will run away screa
by nnq 13y ago
The syntax is not the problem for Haskell gaining acceptance for web dev.
Most web devs are frightened by functional programming idioms and will run away screaming when exposed to monads.
But the biggest problem imho is the type system that while great, makes things like making simple structs / named tupples or whatever you want to call them annoying and the lack of any "nice" way to just do OOP in it - and no, saying OOP is a bad idea and pretending it doesn't exist doesn't work.
Scala is a good Haskell for web dev. But it's too complex and has no chance of broad adoption against Node/Javascript, Ruby, Python and even PHP frameworks because for 90% of devs it simply doesn't bring anything good enough to make it worth putting up with the complexities stemming from the unholy OOP+FP mix.
- deleted 13y ago[deleted]
- klrr 13y agoSorry, actually thought you were trolling when you first said only math major use it and then made it sound like the syntax was the reason for. The core points in your criticism is known though, and basically apply to any other language. Most language with new concepts and new syntax will be difficult to learn if you already are used to another language. Especially if the language is almost the opposite of the one you learn. Imperative language are about writing how and writing functionally is about writing what. Widely different mindset is needed to accomplish many tasks. Recursion being one thing, monadic computation being another. One thing many people coming from OOP to Haskell have a hard time with is that they write new classes when what they really want is new datatypes. In the end you win when you've learnt a language such as Haskell though, cause even if you won't write production code in it you will learn a lot of useful practices you can apply to everyday programming. Also you will have a new language to write your side projects in. ;)
- kazagistar 13y ago> In the end you win when you've learnt a language such as Haskell though, cause even if you won't write production code in it you will learn a lot of useful practices you can apply to everyday programming. This is why I hopefully trudge on, even though the further I get into haskell, the more hope I lose of this being true.
- miloshadzic 13y agoConsider that what is realism for you is just FUD for someone even moderately into the language.
- the_af 13y agoI'm a Java dev in my day job, and I have to say that as a beginner in both Haskell and Scala, I surprisingly find Scala far more difficult than Haskell. Scala's type signatures are even harder than Haskell's (or at least, mixing FP with OOP makes them harder for me) but you don't get the same guarantees about side-effects and the type inference doesn't work as well. And implicits scare me. Scala's OOP may be good or bad, but it certainly adds an additional layer of complexity, and one you can't ignore when reading or using someone else's code.