Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder if we'll ever see `scan!` in the STD lib...


I hope not.

With a healthy crate ecosystem, std should be as small as possible (without being too small).

It makes sense for std to contain:

- Types that can't easily be put in a module (eg the `Fn` trait)

- Types needed for cross-project interoperability (like `TcpStream` or `Future`). Having these in std helps prevent ecosystem fragmentation.

- Stuff that gets used in most non-trivial projects (eg `Box`, `Vec`, `println!`)

Everything else belongs in a crate, where it won't bloat up the size of rust's standard library for everyone in perpetuity. `scan!` looks great; but I expect it'll be used in less than 1% of projects. There's no shame in keeping it in a crate - thats what they're for!


I see this come up a lot for various things in the Rust ecosystem. I think that moving more things into the standard library would actually be a net loss, mainly due to the versioning being tied to that of Rust itself. Once something is moved to the standard library, there can never be any breaking changes unless Rust 2.0 becomes a thing (which currently the core team says is not going to happen). It also makes the burden of doing bugfix releases much higher; for smaller bugs, users will have to wait until the next release of Rust itself, and for larger bugs, the entire language will have to do another release ahead of schedule. Given how easy Cargo makes it to add a dependency and how few projects can't actually use Cargo, I think it's better for the overwhelming majority of the ecosystem to keep things like this out of the standard library.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: