4 ms·
My job involves overlooking hundreds of internal codebases and I see people doing `import {range} from 'lodash'` every once in a while. One offending line and t
by lhorie 7y ago
My job involves overlooking hundreds of internal codebases and I see people doing `import {range} from 'lodash'` every once in a while. One offending line and tada: 70k+ bundle size for no good reason...
I'd say that any argument for/against lodash can go both ways: if one argues that it is a micro-optimization to handwrite `range`, another person could argue that it's also a lazy devexp micro-optimization to use lodash. `range`, for example, can be implemented with a one liner in like 5 mins and tested thoroughly with a couple of asserts.
Maybe one could argue that some of the more compositional stuff is not so trivial to write (e.g. cond and friends), but if one's using those over normal small procedural functions, who's really engaging in engineering perfectionism gone counterproductive?