Hi Arve! Thanks for your comment!
Fredrik Jensen
11

Fix-time for pad left is indeed impressive, but the fundamental problem is still that it happened.

That aside. Regarding small modules, I still think it’s a bad thing to have pad-left and pad-right as separate modules. In fact, they are single functions, whereas a module should, in my opinion at least, be a collection of related functionality. “text-formatting” could be a module containing padding functions, among other things. Having every single function as a separate module creates an enormous dependency tree, which also costs a lot to maintain over time — both in time/money and in frustration.

Regarding a good “baselib”: Why would that be a huge problem in JS, when it simply isn’t in other languages? You can still override, replace or simply not use it — and use your own, if needed. The community can then utilize their time doing other stuff, instead of re-implementing and re-solving (for the 128797th time) problems that were solved twenty years ago. (Text-padding is a good example).

I know 10 years is a long time for web — at least for the front end/client facing part. Back end services running business processes however, might just live longer than that — constantly being maintained. Assuming zero dependency management cost here is a dangerous way to go. Or — one can’t know if that module you rely heavily on will even exist ten years from now.

We can’t, however, know this for sure, since NodeJS isn’t old enough to be running such apps over that long time yet.

Plus, “light years” is a measure of distance, not time ;-)

¯\_(ツ)_/¯

(plus, Medium has a slightly confusing comment-to-comment-structure :p)