3 ms·
>There are definitely trade-offs involved when making decisions to inline vs import. If someone can't make the right trade-off regarding "should I import a mod
by coldtea 11y ago
>There are definitely trade-offs involved when making decisions to inline vs import.
If someone can't make the right trade-off regarding "should I import a module called "isArray" or "is-positive-integer", then they should not be programming...
- lmm 11y agoYep. Everyone mocking NPM and the javascript community for this ought to retire, they clearly don't understand how to program in this day and age. Or is that not what you meant?
- robmcm 11y agoI think a lot of the confusion here is that in most languages "isArray" or "is-positive-integer" are simple functions of simply build into the language. Dynamic typing and diversity of devices and virtual machines mean the ability to simple tell if something is an Array could be multiple lines of code that could take a considerable amount of time to test. Delegating this to the community is arguably the only sane choice, however strange that may be to someone come from another environment.