3 ms·
> EDIT: my favourite part, is-even depends on is-odd. Probably because it just does return !is-odd(x); So it can take advantage of all the type checking
by umvi 6y ago
> EDIT: my favourite part, is-even depends on is-odd.
Probably because it just does
return !is-odd(x);
So it can take advantage of all the type checking and other corner case junk in `is-odd`
- Kye 6y agoIt does seem like JavaScript/NPM has the advantages of composability found in Unix tools. It's no different from zcat | grep or similar. All that's different is the people making these tools have a wider range of experience and knowledge than people hacking on C making Unix tools, and easier distribution.
- 15rthughes 6y agoThere’s an argument to be made that micro packages follow the ideas of the Unix philosophy, but to compare is-odd and a derivative that simply negates it’s results to piping two well optimized coreutils together is definitely a stretch. I’d also say that implying JS developers inherently have a wider range of experience and knowledge compared to developers of coreutils is flat out absurd.
- Kye 6y ago>> "I’d also say that implying JS developers inherently have a wider range of experience and knowledge compared to developers of coreutils is flat out absurd." I was way too ambiguous, so I see how you understood it that way. I meant in the downward direction. There are more packages from more people in JS, so you end up with lots of first projects, small experiments, etc. So you have 100% of coreutils being decent to amazing, while it's probably closer to 1% with NPM. Both ways have their advantages, but it's easier to footgun with the highly inclusive NPM approach.