Re:Elm at Rakuten
by dimitrios1 on Wednesday August 18, 2021 @02:07PM
(#28224950)
Once you detach from "I must use a library for every thing" land, you begin to realize you don't need the overwhelming majority of them. Which results in writing cleaner, simpler, more focused code, with less of a surface area for bugs. It's a whole mindset, tbh.
[ Parent
| on HN ]
Re:Elm at Rakuten
by ModernMech on Wednesday August 18, 2021 @02:26PM
(#28225240)
I appreciate libraries for:
- ubiquitous things, like data structures
- hard to get right things, like time
- implementations of specs, like Unicode
- hardware interfaces, like CUDA
For everything else, I'll take the above and roll my own solution.
What about something tedious and ubiquitous, such as swapping between camel and snake case?
Re:Elm at Rakuten
by PhineasRex on Wednesday August 18, 2021 @07:40PM
(#28228609)
This is exactly the case where you don't need a library. This is a single function (or two) and you can easily translate an existing code example into the language you're using in a few minutes and be done with it.
Re:Elm at Rakuten
by dimitrios1 on Wednesday August 18, 2021 @03:58PM
(#28226330)
except for the last one, all of those should be part of the language you are using, and well thought out + researched. I guess I should have been more specific: third party dependencies.
Re:Elm at Rakuten
by scotttrinh on Wednesday August 18, 2021 @04:17PM
(#28226528)
In this specific case (Elm vs. JavaScript) We're talking about JavaScript here, so:
> - ubiquitous things, like data structures
There are a few basic data structures in JS, but almost everything else is in user-land.
> - hard to get right things, like time
Date is a notoriously bad API in JavaScript.
- implementations of specs, like Unicode
We just get a String type in JavaScript which is UTF-16, so...
Re:Elm at Rakuten
by dimitrios1 on Thursday August 19, 2021 @09:57AM
(#28233871)
> We're talking about JavaScript here, so:
Well, no, we aren't. We are talking about the Elm language, which compiles to JavaScript.
There are also other excellent languages that target JavaScript that have these things.