4 ms·
Maybe the solution for highlevel languages is to just routinely add useful helper functions, either in separate name spaces or directly to global with a naming
by dec0dedab0de 11y ago
Maybe the solution for highlevel languages is to just routinely add useful helper functions, either in separate name spaces or directly to global with a naming convention to avoid conflicts. If thousands of people are doing the same thing it really doesn't make any sense for them to all come up with their own version.
- tetha 11y agoThinking about this for the last few days, I think the Java SE / commons-approach seems the most sensible to me. Your stdlib is bundled with the language runtime and contains binaries, OS interactions and the necessary fundamental stuff. Updating this is hard, because this depends on hard things like the OS, and because it must maintain compatiblity with everything. However, the commons-package can add all kinds of pure (as in, just the language in question) stuff to the language, such as several dozens of collections, all kinds of utility languages, and so on. Updating this would be a lot less risky than updating the entire language runtime, especially if it uses proper semantic versions. This would allow this lib to iterate faster and include these utility-functions easier as well.
- dec0dedab0de 11y agoThe example that always drives me crazy is itertools in the Python standard library. In the documentation there is a recipes* section that lists 23 helpful functions, instead of just including them in the library * https://docs.python.org/2/library/itertools.html#recipes https://docs.python.org/2/library/itertools.html#recipes
- talideon 11y agoWhat's super frustrating is that Python 3 would've been an ideal opportunity to move those into the standard library, but it was never done.
- claar 11y agoThis is the PHP approach, minus the consistent naming convention. It's very convenient from the developer side to have a myriad of things in the core language.