Yet, when a node developer creates left-pad...
Yet, when a node developer creates left-pad...
(1) Dependencies always add certain minimal level of complexity, so a too-trivial dependency can add more-than-warranted complexity as a dependency even when the implementation itself would not do so as an integrally-maintained component of the larger system.
(2) the nature of the npm distribution ecosystem (and this is by no means unique to npm) means that the complexity and risk added by dependencies managed through that ecosystem is more than it otherwise could be with immutable, append-only repositories of dependencies.
The include is immutable (unless there are macros).
Append only sounds like the included code should be evaluated after other code in a given file (so main defs would take precedent over included defs? Or main defs would be over-written by included defs... I guess it depends on compiler/evaluator implementation.
The more I type here, the more I realize how much I don't know about this stuff...
Legal and practical constraints would probably mean any real system would be at best an approximation of this ideal, but a big part of he leftpad problem is that NPM at the time didn't even try to approximate it (the response also underlined an NPM policy existing at the time that was useful in that context but dangerous in general, in that NPM generally allowed others to claim the name of abandoned projects.)
http://erlang.org/pipermail/erlang-questions/2011-May/058768...
> - contribution to open source can be as simple as contributing a single function > - there are no "open source projects" - only "the open source > Key-Value database of all functions"
Look at the examples he gives:
is_blank_line
is_prefix
remove_leading_whitespace
remove_trailing_whitespace
remove_leading_and_trailing_whitespace
skip_blanks
trim
and many morehttps://news.ycombinator.com/item?id=8342755
https://joearms.github.io/published/2015-03-12-The_web_of_na...
There is absolutely no problem with the first one. Nobody is complaining about the author writing left-pad, only about it not being available in the standard library or some larger package. Changing the entire infrastructure so code becomes immutable and requires no trust would work too.
http://erlang.org/pipermail/erlang-questions/2011-May/058768...