News for hackers. Stuff that matters.
Re:Why I’m Leaving Elm by toastal on Friday April 10, 2020 @06:07AM (#22831535)
This is untrue--and I'm not entirely sure you followed the article. You can't do synchronous tasks like Intl's format for strings from floats as many locales use "," over ".". It is a pure function `Float -> String`. This should not have to go through the entire update cycle to handle receiving these kinds of value. Using ports adds async to this equation which means you need to write the ports, and handle and store all temporary values which tightly couples and makes a mess everything.
Re:Why I’m Leaving Elm by maxhille on Friday April 10, 2020 @11:50AM (#22834248)
It is now 'Locale -> Float -> String' or do I miss something?
Re:Why I’m Leaving Elm by toastal on Friday April 10, 2020 @10:27PM (#22839232)
Conceptually it's `Float -> String` once the Intl object is instantiated, but you can't use it in Elm anyhow. You'd have to reimplement and ship the entire in-browser Intl spec.