4 ms·
Well Reason is really Ocaml, which has a much better type system than Elm (functors, open variants, a class system) , powerful meta programming (the react exten
by orbifold 8y ago
Well 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.