r/purescript • u/mindeavor • Jun 09 '17
Why PureScript?
Hi all, I am searching to fulfill my dream of finding a language/ecosystem for elegant, strongly-typed web development. What would you say to convince me to learn & use PureScript? What makes it unique? Why use it over other the alternatives, such as Haskell, ReasonML / OCaml, FSharp, and so on?
I thank you for your opinion in advanced.
14
Upvotes
View all comments
Show parent comment
6
u/tdammers Jun 16 '17
We used purescript at work for almost the same reasons:
We simply addressed these by running PureScript on the server as well (through node.js).
Lack of a template metalanguage was one of the actual downsides. We made do using code generators - not ideal, but good enough for our needs. I hear there's work underway to make Template PureScript happen though, so that's promising.
There are lens implementations in PureScript as well.
It does. We used Halogen, which I kind of like; design wise, it sits somewhere halfway between a react-style component-based architecture and something more pure-functional. Biggest downside here is that the type signatures can get hairy due to the extensive amount of type-level guarantees Halogen provides, and the generalized nature of the beast often makes type signatures mandatory. We worked around most of that using a free monad, so we could keep the effectful stuff contained in one module.
Frankly, I have no idea how the two languages compare in this regard; I'm kind of a minimalist that way, I hardly use more than syntax highlighting support and some language-specific predefined macros in my .vimrc. I've toyed a bit with syntastic and various plugins for both Haskell and PureScript, but neither really blew my mind, and both turned out to be unacceptably brittle and sluggish. It's just not big enough a deal for me to bother with. From what I've seen, I'd say that PureScript's editor tooling is marginally better, but it's quite possible that I just haven't seen enough.