3 ms·
> Using a library for every little function, or worse, adding a huge library for a couple of function calls make my hairs go up. Well then which one is it? The
by sureIy 2y ago
> Using a library for every little function, or worse, adding a huge library for a couple of function calls make my hairs go up.
Well then which one is it? There’s no middle ground, unless at some point you decide it’s now worth using a big library and start replacing your own code.
If you decide to write everything from scratch, good luck to your users, they’re not getting a better product.
- bayindirh 2y agoI use big and well matured libraries for the critical parts of my code. These can be logging, option/file parsing, or linear algebra. When I add these libraries, I use most parts of them at the end of the day. However for other one-off things like internal state handling or stuff which I can prop up using the standard library, I refuse to use external libraries. I kindly disagree on the part of they're not getting a better product. On the contrary. They require to manage less dependencies, most critical parts are well cooked/tested, and other parts are built using the standard library which is built to build these things. When rolling things forward, I need to juggle less dependencies, too. So things can move forward easier. It's not like I'm banging the keyboard and shouting done when it prints something meaningful to screen.
- Chris2048 2y ago> There’s no middle ground unless using a language that supports tree-shaking. Also, you could also use the same interface (fn-signature etc), or even add a flag for if the lib is installed (in python, try-except over import, with "dummy" module as fallback).