5 ms·
(Caveat, we're adopting Elm and so I'm a little biased) I think this article's conclusion of Reason being the enterprise grade and mainstream implementation of
by danpalmer 8y ago
(Caveat, we're adopting Elm and so I'm a little biased)
I think this article's conclusion of Reason being the enterprise grade and mainstream implementation of Elm, and Elm being a "prototype" is a little unfair to Elm.
Elm has developed a mature ecosystem in many ways, in a relatively short space of time, and two of the main reasons for that are the purity and the way the JS interop works. It explicitly shields the Elm world from issues in JS. This is one of the reasons we've decided to choose it. It is much more than a prototype, this was something that factored into our decision making process heavily.
I'm sure there are great things about Reason, but I can't help but feel that the impact will be limited because it doesn't take a stronger viewpoint.
- orbifold 8y agoWell Reason is really Ocaml, which has a much better type system than Elm (functors, open variants, a class system) , powerful meta programming (the react extension is just syntactic sugar around that) and is now backed by at least three large corporations (Facebook, Bloomberg and JaneStreet). It has a proven track record of handling large sophisticated projects and is not restricted to the web front end niche because it compiles to native code aswell. So you are able to write both the server and client code in the same language. The fact that reason has a dsl for react is just one of the killer arguments.
- danpalmer 8y agoThe type system might be more powerful, my point is more that if you can bypass it and integrate directly with JS, then people will, and then much of that value is lost. Elm doesn’t have that problem.
- machiaweliczny 8y agoIt lowers barrier to entry. You don't have - it's opt in. Not every project needs 100% type safety. I would also love option to have gradual type friendliness because when prototyping I know my program is wrong in some different part, but I want to test given component in runtime, while I haven't refactored everything yet. I think having option like 'compileWithoutTypecheck' is very good for prototyping.
- danpalmer 8y agoYou can use `Debug.crash` in Elm, or `error` or `undefined` in Haskell to achieve this. They type check to anything, but will halt execution if reached.
- spraak 8y agoYou can type your JS bindings
- orbifold 8y agoNot everyone has a greenfield project the fact that it integrates with JavaScript seamlessly and generates readable JavaScript is an advantage. They go as far as providing a plug-in for the standard JavaScript build flow, so you can basically start by just converting one file. On the other hand ocaml’s package manager (opam) and build system (jbuilder) are much better than elms equivalent and nothing is stopping you from using those for a greenfield project.
- e12e 8y agoNot to mention a real compiler for building executables as well, should that be of interest.
- tfranco 8y agoJust for the sake of completion, we covered ELM a few weeks ago: https://www.imaginarycloud.com/blog/elm-javascript-reinvented-1-overview/ https://www.imaginarycloud.com/blog/elm-javascript-reinvente...