Hacker News new | ask | show | jobs
by the_mitsuhiko 3400 days 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.
2 comments

I also had problems understanding this whole crate system when I was playing with Rust.
This is extremely common, and is one of the reasons why it's such a big part of this post.
but in the post reason of the pain (conventions) described as a cure, and it's really awful.
They 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.
You don't need different syntax. Just prefix all non carte imports with your own crate name.