The Great Module Adventure Continues

Was the [krate]::foo::bar syntax decided against? It's semantically equivalent to the rest of the use extern::krate::foo::bar syntaxes and feels more natural than the already-overloaded single colon while being less heavy.

Having use foo:bar; (or use :foo::bar;) and use foo::bar; refer to 2 similar but different things feels like it would raise "when do I use a single colon and when do I use a double colon" confusion.

Of course, if we can have a good enough fallback story (which I am not that sure there is - IIRC there was a problem because use foo; can either crawl in the filesystem to find foo or import a module foo) then using a crate::-style syntax might be a better choice to reduce the impact on examples.

4 Likes