7 ms·
I think it's possible to design a more intuitive system with less busywork: 1) For imports, the namespace hierarchy should have a one-to-one correspondence wit
by cousin_it 10y ago
I think it's possible to design a more intuitive system with less busywork:
1) For imports, the namespace hierarchy should have a one-to-one correspondence with the file and directory hierarchy.
2) For publishing code, instead of modules and Cargo, there would be one huge worldwide repository. You'd be able to freely import anything marked public, and the build system would cooperate with version control to make things work seamlessly.
Unfortunately it's probably too late for Rust to adopt such ideas. I wish some new language used them, though.
- steveklabnik 10y agoGiven that crates.io has no namespaces, this is kinda sorta how this already works, I think. Or at least, I don't understand the distinction.
- cousin_it 10y agoWell, you have two tools that can fetch stuff - git and cargo. In my preferred workflow there'd be only one tool. It would also work as a cloud filesystem, like p4fuse.
- steveklabnik 10y agoCargo can use git, but it doesn't primarily. Crates are stored as tarballs on S3.
- cousin_it 10y agoRight, I don't see why that's necessary. The whole world could be one big source control repository where each client keeps only their local changes. So e.g. if you want to make a local tweak to a third party library you're using, you 1) edit their file in your filesystem which is a transparent view into the world repo, 2) recompile your project.
- steveklabnik 10y agoThat forces everyone to use git, which is not something we're interested in doing.
- cousin_it 10y agoAgreed, it would force everyone to use the same VCS. I've lived in this kind of setup for years and I'm very happy with it, but point taken.