News for hackers. Stuff that matters.
Re:Why I'm Leaving Elm by adamwk on Saturday June 10, 2023 @03:46PM (#36274327)
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
Re:Why I'm Leaving Elm by paulddraper on Saturday June 10, 2023 @04:40PM (#36274867)
React doesn't have i18n
Re:Why I'm Leaving Elm by dhucerbin on Saturday June 10, 2023 @08:59PM (#36276934)
But React doesn’t prohibit calling Intl API in your code.
Re:Why I'm Leaving Elm by mejutoco on Monday June 12, 2023 @03:13AM (#36289524)
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 :)

Re:Why I'm Leaving Elm by mejutoco on Saturday June 10, 2023 @06:02PM (#36275628)
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.