Skip to content

Comment on Why I'm Leaving Elm (2020)parent

Comments

Is there l10n and i18n support yet? I don’t know how a UI framework can be considered production ready let alone finished without support for string translations. Last I checked, after Elm 19 killed the third party wrappers around Intl I hadn’t seen any movement here, but maybe I missed it or this has changed since then

That is exactly what I meant with you have to roll your own of everything. The building blocks for this one are there.

Elm could have server side rendering too, like nextjs. That is IMO way worse.

React doesn't have i18n

But React doesn’t prohibit calling Intl API in your code.

Elm does have a escape hatch: ports. You could use ports to call any javascript library. I have done it and it works.

Ports are needed because they make any js code go through the same "even router" than any Elm code. It works very well. Without ports js would break the guarantees that Elm provides. It is quite an elegant solution.

The only problem is if you wanted to call something requiring very high performance, like an event loop in a game, then going through a port call on every frame would probably be too slow. Even in that case you could write a bigger chunk outside of elm and call it from elm, and it would be ok. Please note that this problem happens with any?/most? FFI implementations in any language.

P.S. React does not prohibit anything. They just shame you into it not being best practices :)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.