3 ms·
> The dot in the name has no semantics it's just a separator. That's not true of all module systems. It's true in Java, but not in Rust, where it establishes a
by twic 2y ago
> The dot in the name has no semantics it's just a separator.
That's not true of all module systems. It's true in Java, but not in Rust, where it establishes a parent-child relationship, and in which context [1]:
> If an item is private, it may be accessed by the current module and its descendants.
[1] https://doc.rust-lang.org/reference/visibility-and-privacy.html#r-vis.access https://doc.rust-lang.org/reference/visibility-and-privacy.h...
- kibwen 2y agoAnd privacy in Rust is load-bearing for encapsulating unsafe operations from safe code, so it's not just a nice-to-have, its fundamental to the language.