I've been looking at the options for pure-functional languages targeting JS, and it seems that PureScript is superior to Elm from a technical perspective for full-stack webdev. PureScript takes the approach of providing a full Haskell-like language that is "native" to the JS world. It has the features and type system of Haskell, but atop a cleaned up version of Javascript's semantics (e.g. strict evaluation, not lazy…
New Adventures for Elm
41–50 of 95 posts
Re: New Adventures for Elm
#42Earlier quoted context omitted.
Yes we are. You have to look at what you are competing against. OCaml has a much better module system (and a richer type system altogether). Purescript/Haskell got typeclasses and HKT, among lots of things. As I said, Elm is cute and interesting, but it's type system is less expressive than other languages and lacks features that I consider essential. Sure, it's better than javascript, but why not opt for the other t…
It's a trade off between functionality and user friendliness. You can currently do more with Haskell/OCaml/F# but Elm definitely has the edge when it comes to user friendliness. If that bothers you, just think of Elm as a useful tool in expanding the pool of functional programmers.
The other thing is that Elm comes with the "Elm architecture". A OCaml GUI app backed by the react FRP library comes with "here is an FRP library, figure out the best architecture yourself" architecture. There are other open questions such as "how can I combine this with the hundreds of thousand JS packages on NPM" and "can I use it with Webpack/Typescript/other trendy JS techs".
That said, the possibility of compiling pure-OCaml libraries to JS is quite interesting.
Re: New Adventures for Elm
#43My comment is off-topic and likely to annoy people here, but I'll say it anyway: that entire page appears to have been generated in Javascript. If you view source, there is no HTML at all. What would a user with a screen reader hear if he or she were to visit that page? If the page had been written in plain HTML and CSS, it might be about 10-15k in size. At the moment, written in Javascript, it's over 300K in page we…
Well, the page still renders paragraphs and titles to good ol'
s and s, so i'd presume a screen reader would just read those things as the page content. Wouldn't it?
Re: New Adventures for Elm
#44Here's the path I've been following : (ruby)rjs -> prototype -> jquery -> backbone -> angular -> react -> flux -> redux -> elm... But I'm just a backend guy happy with Ror, just waiting to go on the frontline... with the proper weapons! My feeling about elm is that it's more than the new kid on the js block. It's closure without parens, it's Haskell without academy, it's Redux without facebook, it's duck-typing witho…
That's a lot of churn. You should stop and ask yourself if it's worth being on the cutting edge all of the time. Are you making better projects as a result of dropping "old" tech the moment something shinier comes around? Everything has tradeoffs. Elm has no server side rendering, for example.
Re: New Adventures for Elm
#45My comment is off-topic and likely to annoy people here, but I'll say it anyway: that entire page appears to have been generated in Javascript. If you view source, there is no HTML at all. What would a user with a screen reader hear if he or she were to visit that page? If the page had been written in plain HTML and CSS, it might be about 10-15k in size. At the moment, written in Javascript, it's over 300K in page we…
> What would a user with a screen reader hear if he or she were to visit that page? Well, the page still renders paragraphs and titles to good ol' s and s, so i'd presume a screen reader would just read those things as the page content. Wouldn't it?
Re: New Adventures for Elm
#46I've been looking at the options for pure-functional languages targeting JS, and it seems that PureScript is superior to Elm from a technical perspective for full-stack webdev. PureScript takes the approach of providing a full Haskell-like language that is "native" to the JS world. It has the features and type system of Haskell, but atop a cleaned up version of Javascript's semantics (e.g. strict evaluation, not lazy…
It's like an OO programmer claiming that Smalltalk is a superior language than Elm. Besides, Purescript is squarely targeted at experienced Haskell programmers, which is not the case of Elm. Elm is an ML language, not a Haskell dialect that compiles to JS.
I also evaluated Elm, Purescript, Roy, F#, JS_of_Ocaml and ended up choosing Elm precisely for the reasons you chose to stay away from it. I only use JS for front-end stuff, I value simplicity over expressivity and I don't want to spend many weeks learning Haskell-like abstractions to start being productive in a new language (in contrast, it only took me an afternoon to start being productive in Elm).
Re: New Adventures for Elm
#47Re: New Adventures for Elm
#48I've been looking at the options for pure-functional languages targeting JS, and it seems that PureScript is superior to Elm from a technical perspective for full-stack webdev. PureScript takes the approach of providing a full Haskell-like language that is "native" to the JS world. It has the features and type system of Haskell, but atop a cleaned up version of Javascript's semantics (e.g. strict evaluation, not lazy…
Re: New Adventures for Elm
#49Here's the path I've been following : (ruby)rjs -> prototype -> jquery -> backbone -> angular -> react -> flux -> redux -> elm... But I'm just a backend guy happy with Ror, just waiting to go on the frontline... with the proper weapons! My feeling about elm is that it's more than the new kid on the js block. It's closure without parens, it's Haskell without academy, it's Redux without facebook, it's duck-typing witho…
That's a lot of churn. You should stop and ask yourself if it's worth being on the cutting edge all of the time. Are you making better projects as a result of dropping "old" tech the moment something shinier comes around? Everything has tradeoffs. Elm has no server side rendering, for example.
Re: New Adventures for Elm
#50I've been looking at the options for pure-functional languages targeting JS, and it seems that PureScript is superior to Elm from a technical perspective for full-stack webdev. PureScript takes the approach of providing a full Haskell-like language that is "native" to the JS world. It has the features and type system of Haskell, but atop a cleaned up version of Javascript's semantics (e.g. strict evaluation, not lazy…
Well, "superior" is subjective in this case. It's like an OO programmer claiming that Smalltalk is a superior language than Elm. Besides, Purescript is squarely targeted at experienced Haskell programmers, which is not the case of Elm. Elm is an ML language, not a Haskell dialect that compiles to JS. I also evaluated Elm, Purescript, Roy, F#, JS_of_Ocaml and ended up choosing Elm precisely for the reasons you chose t…
To be clear, Haskell also comes from the ML lineage.