3 ms·
JavaScript really needs a proper standard library. Has any sort of central authority ever tried to drive this forward? Maybe it should fall upon the ECMA people
by trollied 6y ago
JavaScript really needs a proper standard library. Has any sort of central authority ever tried to drive this forward? Maybe it should fall upon the ECMA people to get this done, seeing as they’re the ones that define the ESx specs? I don’t think npm/node is the answer either, this needs putting together from scratch without being too bloated, much like the C or C++ stdlibs.
- xixixao 6y agoI’m working on a better “standard” (or “base”) library (https://github.com/xixixao/jfl https://github.com/xixixao/jfl), but I’m not sure it’ll be as big as C++ stdlib. Then again I don’t think even a library the size of std would change this picture much. Most of the dependencies in npm are too specific I think.
- hateful 6y agoI like this a lot. I would say that going with one of the existing standard libraries is a start - lodash is a good example. Another thing is anyone can roll most of these tools into standard libraries if the source license allows them to. So maybe some "rollup" packages are in order. You would get more than you need, but if you setup any sort of tree-shaking (which has been the focus of many build systems lately) then you can only bundle what you used in the end. One other thing that may be an issue is if you have two major libraries and each one is missing one function that you need - then you need both...
- trollied 6y agoThe point of having a standard library is that it'd actually ship with the interpreter, so you wouldn't have to "get more than you need" - it'd already be there without having to download. Obviously there would be a period of time (years) whereby you would have to do a conditional download, but the longer term aim would be that it's already provided as part of the base language.
- flak48 6y agoMaybe lodash or just could be the std lib. Just doesn't have any further dependencies. https://github.com/angus-c/just https://github.com/angus-c/just
- nick_ 6y agoMy vote is for lodash, if only to avoid the endless Abbott-&-Costello-style discussion thread confusion :P
- MauranKilom 6y ago> JavaScript really needs a proper standard library. Well, Deno (https://en.wikipedia.org/wiki/Deno_(software) https://en.wikipedia.org/wiki/Deno_(software)) has that as one of its explicit goals. As well as fixing a lot of the other grown idiosyncrasies.
- deleted 6y ago[deleted]