Live data from Hacker News

Ask HN: Anyone Using Elm in Production?

news.ycombinator.com

21–30 of 74 posts

Re: Ask HN: Anyone Using Elm in Production?

#21
I built https://listenparadise.org using Elm, and the code is open source: https://github.com/azer/radio-paradise/tree/master/ui

Although it's recommended to not build components with states, you could still do it if you think it's necessary for your app. I documented the codebase structure I used at; https://azer.bike/journal/elm#codebase-structure

Re: Ask HN: Anyone Using Elm in Production?

#22
I recently did a talk at Oslo Elm Day where I talked about our experience with Elm at my company after using it as the main web langauge for the past 18 months: https://youtu.be/yE9PKFI19RM

TL;DR: - The experience has been terrific. - Best compilator I have ever worked with. - Mostly great tooling. Love the auto-formatter. - Great libraries - No major issues, some small itches but nothing that can't be worked around. - No runtime errors in 18 months. - Very maintainable code - New team members quickly becomes productive in Elm, even with no prior experience (It helps to have someone with experience on the team to guide the learning and answer questions).

When it comes to nesting we sometimes make use of a component-like pattern, where we have modules with their own state, messages, update and view functions that are used by the main functions. To see an actual example of this check out this SPA example: https://github.com/rtfeldman/elm-spa-example/blob/master/src...

Re: Ask HN: Anyone Using Elm in Production?

#26
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 effort. Expect to do some homework, hang out in forums etc.

Re: Ask HN: Anyone Using Elm in Production?

#28
post #19

Elm 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?

#29
post #13

Earlier quoted context omitted.

What is meant by "deeply nested components" and why can't you do them in Elm?

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?

Re: Ask HN: Anyone Using Elm in Production?

#30
post #24

I remember hearing Facebook was using it for Facebook Messenger.

You're thinking of ReasonML, not Elm

Anybody have opinions between the two? If you already know OCaml are there strong reasons to consider Elm instead of ReasonML?
Post reply on HN