5 ms·
My biggest and probably only real frustrating with Rust is that modules and crates live in the same namespace. That makes stuff incredibly confusing to teach a
by the_mitsuhiko 10y ago
My biggest and probably only real frustrating with Rust is that modules and crates live in the same namespace. That makes stuff incredibly confusing to teach and read. I can otherwise live with the explicit extern/mod if needed.
- lohengramm 10y agoI also had problems understanding this whole crate system when I was playing with Rust.
- steveklabnik 10y agoThis is extremely common, and is one of the reasons why it's such a big part of this post.
- EugeneOZ 10y agobut in the post reason of the pain (conventions) described as a cure, and it's really awful.
- keeperofdakeys 10y agoThey need to live in the same namespace, otherwise you'd practically need different syntax for importing something from a crate, or a module. You can use `extern crate foo as bar`, if you are having namespace issues.
- the_mitsuhiko 10y agoYou don't need different syntax. Just prefix all non carte imports with your own crate name.