3 ms·
Rust and JS both have a very small standard library. This is what unites them in a 'dependency hell' of having to handle thousands of packages for most project
by codefined 5y ago
Rust and JS both have a very small standard library. This is what unites them in a 'dependency hell' of having to handle thousands of packages for most projects.
Other languages that don't face this, e.g. Python, have very large standard libraries which already include a dizzying array of features. E.g. take a look at some of the things you get with standard Python[0].
- sqlite3 (DB-API 2.0 interface for SQLite databases)
- bz2 (Support for bzip2 compression)
- sunau (Read and write Sun AU files)
- netrc (netrc file processing)
- curses (terminal handling for character-cell displays)
- mailbox (manipulate mailboxes in various formats)
[0] https://docs.python.org/3/library/ https://docs.python.org/3/library/
- mrec 5y agoThere's a downside to Python's batteries-included approach though: https://leancrew.com/all-this/2012/04/where-modules-go-to-die/ https://leancrew.com/all-this/2012/04/where-modules-go-to-di... HN discussion: https://news.ycombinator.com/item?id=3913182 https://news.ycombinator.com/item?id=3913182 The obvious compromise would be to let libraries bake as third-party projects for a good long while until there's a fair amount of consensus that they're the Right Thing To Do, then pull them into the standard library. Java's Joda-Time would be one example.
- smoldesu 5y agoOracle doesn't own Rust though, there's no real push to onboard these features besides the general curb-cutting efforts for newcomers. For the most part, 'integral' crates like serde and tokio have been community-managed without issue so far, so it doesn't make much sense to pull one open-source developers passion project from them and pass it to another.