Hacker News new | past | comments | ask | show | jobs | submit login

Even if its not just "mutable" state there are a lot of undesirable situations for multiple package imports in rust:

1. Singletonish things like global allocators, rayon-core, etc

2. You may have made a package static safe to mutate with a mutex, but it could be a bad thing to have different versions of that mutex.

3. Compile time computed tables (unicode table, perfect hashes, etc) could be imported multiple times ballooning the binary.

4. ABI/type compatibility with any reexported types




Oh totally. Thanks for listing those out.




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

Search: