DEV Community

Discussion on: freeCodeCamp's Drum Machine project built in Elm

Collapse
 
dwayne profile image
Dwayne Crooks

Have you spent any time with PureScript?

Yes. A little.

Can you compare/contrast?

PureScript seems to be trying to be a better typed functional programming language than Haskell. (btw, PureScript by Example is a good read and is full of solid ideas even if you choose Elm)

Elm is trying to be a better language for developing reliable web apps.

I'm interested to try a small project in one or the other and am having trouble settling on which.

The best way might be to reduce your project's scope (if needed), do it in both and then come to your own conclusions. That way you end up choosing the best tool for your situation.

Collapse
 
deciduously profile image
Ben Lovy

do it in both

You're right, of course this is the best way to choose. Ive skimmed PureScript By Example, but it seemed outdated for the version of the language I was using. Good to know it still mostly applies.

This Elm code is so neat and clean, much more readable than the PS samples I've read, I think you've put the design trade-off succinctly. Thanks!

Thread Thread
 
dwayne profile image
Dwayne Crooks

I've skimmed PureScript By Example, but it seemed outdated for the version of the language I was using.

For me that was fine because I was reading it more for the ideas than for using the ideas in PureScript specifically. For e.g. I've tried learning Haskell in the past but the books and tutorials can be so dense you miss the point completely. I've found that with this new wave of languages like Elm, PureScript, Rust etc they try to reach a less academic audience which causes the writing to be more approachable. It's one of the reasons why I'm now able to grok Haskell and typed functional programming in general.

Thread Thread
 
deciduously profile image
Ben Lovy

Totally agreed re: Haskell. You don't need a degree in category theory to use it at all, but it feels like you need one to learn it.