Elm in the Real World
futurice.com
futurice.com
I pushed to use it for a contract for an open source application [1]. Ultimately that wasn't a success due to various factors but it's interesting to note that the client dropped Elm after I left and hired people to re-write everything in JS.
In retrospect Elm really wasn't the right choice for that project because it wasn't mature enough (and maybe I hadn't been using it for long enough either). The lack of any kind continuation monad for managing effects at that point (later added to the language as Tasks) and the cumbersome interop with JS (still an issue) were real sticking points. It's just frustrating when you have a problem that can be solved trivially with a state-mutating for loop and you have no easy mechanism to do it. The boilerplate required to use Chrome's messaging within the app was really painful.
I tried to use Elm again for a personal project, a kind of gallery website with a JS search function [2]. After starting an initial prototype in Elm I switched to using React (which I had never used before) and found I was much more productive (even though the code is messier). Having a much bigger repository of re-usable modules and being able to take short cuts is really valuable at this stage of development (and the server-side compilation ability is really cool).
These experiences have made me wonder about the real-world place for Elm and how long it would take for it to rival something like React. I definitely think there is a lot of value in learning Elm to help you think about state in your application in a more higher level way but I would really hesitate in advocating to use it for real-world project at this stage (it does depend on the project of course).
[0] https://github.com/switchface/helm
[1] https://github.com/kasbah/mooltipass.hid-app
[2] http://kitnic.it/ | https://github.com/monostable/kitnic (work in progress)
Though on the subject of inter-op, Purescript might be what you are looking for if you want a strongly-typed, Haskell-like language, compiled to JS with a less cumbersome foreign function interface.
Your point still stands though, I hope Elm comes up with some good ways to say "trust me I know what I am doing" and "here is some JS, run it".
EDIT: Though it might be that that goes against the whole premise of the language.
I am very tempted to start learning Elm and Purescript. They both seem very elegant languages, but I keep postponing it until there is an IDE with good code completion, to ease the learning curve.
Unlike Clojurescript, Elm interacts with your explicitly defined Javascript boundary rather than tries to let you mix it all together in the same soup.
The person you're responding to points out that they were more productive once they refinanced their code to take on some technical debt, but that's always an available trade-off in programming.
The JavaScript compatibility problems across browsers are already enough, for me to sell to customers yet another layer to debug that might not even be properly supported by the respective browser debugging tools.
I think Coffeescript, TypeScript and Babel (ES6 and JSX) are completely different beasts to Elm though. I can look at the compiled output of these languages and debug that, I don't really need source maps (though they would be nice).
I guess the idea for Elm is, you won't need to debug as you won't get runtime errors.
https://www.destroyallsoftware.com/talks/the-birth-and-death...
As far as I can tell, Javascript the runtime is a juggernaut that there's no stopping. If a platform gets popular tooling fixes itself.
But on HN that is a sure way to be downvoted.
I hope that pure mobile development doesn't win, because the mobile app ecosystems are way more controlled than desktops/servers, and if everything went Android/iOS, it would be a major loss for freedom.
But you are right that if a platform is popular enough, it will usually attract people that will do this work.
It's just difficult to do non-trivial JS development without only "raw Javascript" in 2016.
On the other hand, switching to React + Redux + webpack (and NPM) has changed development from "we can't do that" or "let's copy paste from some other component" to "I'll have something by tomorrow" and "I'll reuse the generic React widget I made last time". It's really a game-changer.
Also, ES6 >> ES4. Destructuring doesn't bring you what real pattern-matching does, but it's still a lot nicer than what ES4 gives.
Companies that still want to target IE 8 or even the old Safari for Windows.
To clarify further: I normally work as a firmware/electronics engineer so this was a bit of an experiment all around. I didn't charge my normal rates either.
Also make sure to checkout NoRedInk's take-home and its server-side usage of Elm including server-side rendering.
Will check out take-home more when I get a chance, I did see some murmurs on the Elm mailing list of how it would be easy to do server side rendering. What impressed me about React's was that I could just call a function and get the HTML as a string. My project is statically generated so that was exactly what I needed.
Note that it's working. i think i'll install it and play with it on my next free time.
Add to the mixture charismatic personalities like R. Feldman and E. Czaplisky and this could be the answer.
I particularly don't like general purpose language to JS converters like Scala.js, Clojurescript, GWT, etc because I think these converters can cause some cognitive dissonance (based on past experiences). That is I actually think its better to have different languages for different environments but I suppose not everyone shares that belief.
Also their success/fail tasks for HTTP calls reminds me of flux actions being dispatched.
Dispatch action for an http class and then dispatch another action for success or failure. Or did I miss understand?
Even React, Flux, Router and etc comes in several parts.
I know railties are modular but at least they come from the same project and repo and update together.
Then again Rails does let you switch out compatible parts. By compatible I mean if it adheres to "Railties", e.g. using ActiveModel for replacing Pgsql with MongoDB.
Make sure to look at PureScript as well. It is a much less "opinionated" cousin of Elm. By opinionated I mean that Elm pulls HTML and CSS into the code, and has functional reactive programming built in; in PureScript these are libraries.
That said, every time I see a post about it I can't help the immediate response of "didn't pine replace that?"