3 ms·
Best practices should differentiate between libraries and applications. Otherwise, like this guide you assume every piece of code is a library and slow down app
by gregwebs 4y ago
Best practices should differentiate between libraries and applications. Otherwise, like this guide you assume every piece of code is a library and slow down application development.
For example they recommend not using %w for errors- because library authors need to be careful about what information is exposed. However, as an application code developer, %w should be used by default- this avoids an accidental bug where annotating an error could cause an upstream error check to fail- which they allude to in the guide- but now their rule is getting complicated whereas "default to %w" would be safer and improve velocity in application code.