I’ve used it on a deployed and used project app. On a substantial commercial internal project. And have 2 other apps in the works. I’ve used ports and custom elements to integrate JS code. I’m convinced Elm is an excellent way (and my preferred way) to build frontend apps. The learning curve is a bit tricky. I think the path to toy apps is straightforward and fun. The path to “real world” apps requires a bit more eff…
Ask HN: Anyone Using Elm in Production?
31–40 of 74 posts
Re: Ask HN: Anyone Using Elm in Production?
#32Also, we're hiring! No Elm experience required; over the years we've had many new hires pick it up on the job. :)
Re: Ask HN: Anyone Using Elm in Production?
#33Re: Ask HN: Anyone Using Elm in Production?
#34At CurrySoftware we use Elm for all of our frontend needs. Most recent example: https://www.pavoq.com a SPA built with Elm and Rust
Re: Ask HN: Anyone Using Elm in Production?
#35I found Elm to be very productive. Custom types allow you to codify your business logic and _can_ make bogus application state impossible; the compiler's error messages are helpful and the steps to resolve the problem are (usually) obvious; the FLOSS libraries are excellent (elm-css, elm-test); the community is very supportive; JavaScript interop is safe and simple (mostly -- decoding can be a little confusing at first and could use more documentation and tutorials); the compiled JS is _small_ and the applications feel very snappy.
I didn't have any issues with nesting. Your views unfold to match your model. I found creating sub-models for each "page" within my app to be very intuitive -- these choices became obvious as I started prototyping -- and it's easy to share partials across different page views.
Re: Ask HN: Anyone Using Elm in Production?
#36I'm curious what Elm offers that cannot be done in TypeScript.
The redux-like (well, more like redux is elm-like) is baked into the type system so you know it will be done "right".
And thanks to the above, there's less bikeshedding within the team from people who want to reduce boilerplate for bad reasons and make the app worse.
Re: Ask HN: Anyone Using Elm in Production?
#37I'm curious what Elm offers that cannot be done in TypeScript.
Can you, for any button in your interface, at any point in time, reliably calculate at runtime what your page's data model would look like, and if there were going to be any side effects, if you were to click on that button - but without clicking on it or invoking its callbacks (which could potentially change all kinds of things)? You can do that with Elm (more info here - https://lukeplant.me.uk/blog/posts/two-experiences-with-elm/ ), due to The Elm Architecture and everything being immutable.
(In theory you could do this in TypeScript, but it would be a lot of work and its reliability would depend on everyone coding everything a certain, very unnatural way, with no help from the compiler).
I'm using Elm in production, version 0.18, it is an extremely robust way to make front end code. You just don't have runtime issues.
However, like IBM folks (mentioned in another reply) who said in the their post they didn't know how they would upgrade to 0.19, I also don't know how I will be able to upgrade. Specifically, 0.19 adds some cripple-ware restrictions (you can't use native modules unless you are contributing to certain projects). So, if you want to use something like Intl - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... - not only is there no wrapper provided, the restrictions in 0.19 attempt to stop you from writing your own wrapper. Only the core team can do it, which requires them having both the expertise and motivation to do so. Plus Elm has essentially a closed-source development process. In fact, there is no 'process' for contributing, and the fact that there is no process is deliberate, as far as I can tell.
So for me, if I can't find a way around the restrictions, they may kill my ability to being able to keep my code nicely architectured (i.e. using The Elm Architecture). I may be forced to switch to something like ReasonML with bucklescript-tea - https://github.com/OvermindDL1/bucklescript-tea
Re: Ask HN: Anyone Using Elm in Production?
#38Elm made me hate working with Javascript in my job, and the differente is brutal. I don't believe in silver bullet but this is the domain where Elm shines: frontend development. I love every aspect of it. Elm is a very simple language, generates very small assets with a really fast compiler, gives us guarantees of no runtime exceptions in production, easy refactoring (in JS it would be a nightmare), has a time travel…
Just out of curiosity, how often do you use time travel debugging? I have redux dev tools and can use it on any of my apps, but I've never felt that it was more useful than the step debugger. The first time I set it up I thought "huh, cool" and then never used it again. There's also the issue of side effects like ajax requests that interact with the outside world.
Re: Ask HN: Anyone Using Elm in Production?
#39At CurrySoftware we use Elm for all of our frontend needs. Most recent example: https://www.pavoq.com a SPA built with Elm and Rust
FYI I think you have a problem, at least in latest Firefox for Mac https://imgur.com/Sd9960X . Those messages are being logged multiple times a second.
Re: Ask HN: Anyone Using Elm in Production?
#40Earlier quoted context omitted.
I think “deeply nesting components” means dropping a stateful component (view+behaviour+state) anywhere in your app without anything else changing. That’s not possible in Elm since the only place to store state is the central state storage. Which makes perfect sense, but often freaks people out, since it’s an uncommon design constraint.
With only one store, how do you keep your state reasonably organized when you get up to hundreds of pieces of data to manage? And what do you do about generic reusuable components that need state? Say a typeahead search that needs to track the input string and the list of results from the server?