4 ms·
I looked at Elm a couple years back and decided on Purescript instead: http://www.purescript.org/ http://www.purescript.org/ Has a much better FFI story with J
by tbenst 8y ago
I looked at Elm a couple years back and decided on Purescript instead: http://www.purescript.org/ http://www.purescript.org/
Has a much better FFI story with JavaScript than Elm, and has a more powerful type system (higher kinder types, etc). Row polymorphism makes writing pure code a joy, the effects system is unobtrusive. I actually enjoy programming purescript more than Haskell.
- arianvanp 8y agohttps://github.com/slamdata/purescript-halogen https://github.com/slamdata/purescript-halogen is a very nice frontend library with local state per component, such that not the entire vdom needs to be diffed. However, if you want an easy migration path, there is https://github.com/pselm/core https://github.com/pselm/core Which is a drop-in replacement of the Elm 0.18 API in purescript. You can almost directly copy your elm code to it and it will work with minor changes
- dan-robertson 8y agoI recall looking at halogen a while ago (maybe a year?) and I didn’t really get where it was going. The goal is to do ui in a functional language and you chooses a functional language for various reasons. But then the halogen components are essentially reimplementing object orientation in purescript (so everything looks weird, there isn’t special syntax for common things, and the types are bizarre): Components are these things that have a way to initialise themselves, an internal state, a way to receive messages and update their internal state, a way to compute from the internal state (ie rendering), and a way to reply to messages that are querying things (by having the message pass a callback for the reply as an argument). The only thing they have which is missing from standard oo is a way to pass up messages to their parent component. After all that one must wonder what the point of using purescript for this is and why not just use a more object-oriented language fron the start?
- mbo 8y agoThat `core` `README` is really good! It's convinced me to look more into PureScript. Thank-you!
- platz 8y agoI like halogen, but elm folks may want something more familiar (and with less type variables).
- arianvanp 8y agoDefinitely. One of the 'elm-like' libraries (like the one I also linked) are a great stepping stone to get started.
- platz 8y agoI don't think you even need to call them stepping stones. They are perfectly fine libraries in their own regard. Slamdata had some specific requirements with halogen that everyone may not need. And although the free monad approach is nice, it certainly is not fundamental or necessarily the best depending on the task to UI construction.
- platz 8y agoExactly, take a look at https://github.com/utkarshkukreti/purescript-hedwig/blob/master/examples/Counter.purs https://github.com/utkarshkukreti/purescript-hedwig/blob/mas... I think anyone who is already comfortable with elm can look at that and be productive in purescript very quickly. * Of course, with purescript there is going to be a bit less hand-holding. But the side-projects I see folks posting about in done with elm are done by folks that already do things on their own.
- haolez 8y agoIs Purescript still around? It’s github repo shows very little activity, but this is not always a bad sign, so I’m curious.
- k__ 8y agoIt was too Haskell for me and used Bower. Seemed like a project that was far to removed from JS and its eco system.
- g4k 8y agoThe inventor and lead mantainer giving up on his role a few months ago might have had a detrimental effect.
- georgeam 8y agoCould you provide a reference for this? I'm just hoping you are not mixing up Python (by Guido van Rossum) and Purescript (by Phil A. Freeman).
- anothergoogler 8y agohttps://twitter.com/paf31/status/941745900426215424 https://twitter.com/paf31/status/941745900426215424
- georgeam 8y agoThanks for the reference -- that's rather unfortunate because Phil Freeman did a great job leading the project. BTW my question could sound like I am hoping Phil Freeman has given up the project leadership, which isn't what I meant to say. I should have said "I was wondering whether you are mixing up ...".
- anothergoogler 8y agoOh, I didn't interpret your comment that way at all, your intended meaning was clear (to me).
- sixstringbudha 8y agoHow is performance and asset size like? For me those are a deal breaker.