4 ms·
I don't recommend Elm because it's not Haskell and it's too boxed into its way of doing things. Elm is really, really far from being an acceptable substitute fo
by coolsunglasses 13y ago
I don't recommend Elm because it's not Haskell and it's too boxed into its way of doing things. Elm is really, really far from being an acceptable substitute for Haskell. It's a gap comparable to that of what Java and Scala can do.
PureScript is a better choice for a Haskell'ish language that is generically applicable to both browser and node-backed JS.
Importantly, you can decide how you want to do FRP/callbacks/whatevers according to the needs of the libraries/app/problem you're working with.
Also, PureScript has typeclasses, higher kinded polymorphism, the works. It even has some cool stuff that Haskell does not built in!
See this post for example of why higher-kinded polymorphism is important: http://bitemyapp.com/posts/2014-04-11-aeson-and-user-created-types.html http://bitemyapp.com/posts/2014-04-11-aeson-and-user-created...
- jnbiche 13y agoI would agree that there are probably more "Haskellish" compile-to-JS languages, but the wiki mentioned CoffeeScript and TypeScript. Surely Elm ranks above them in your book? Besides, Fay doesn't have typeclasses, either, and it's mentioned. I wasn't making the claim that Elm was somehow better than those options, just that I was surprised it wasn't included. I've just played around with Elm, nothing serious. You're correct that Elm seems more like a DSL in some ways with its required FRP, and I agree that typeclasses and HKTs are nice, but if I could choose between doing my day job in Elm or staying with JavaScript, I know which I'd pick (hint: it's not JS).
- coolsunglasses 13y agoDo not underestimate how powerful and useful HKTs and typeclasses are until you've used them in anger. I have a guide to learning Haskell here: https://gist.github.com/bitemyapp/8739525 https://gist.github.com/bitemyapp/8739525 You should give it a whirl. Just use PureScript if you're fortunate enough to know alternatives to JS exist :)
- skrebbel 13y agoWhy are you intentionally ignoring half of the parent's comment, twice? You're not contributing to the discussion at all.