News for hackers. Stuff that matters.
Re:Why do we need modules at all? by twic on Friday April 04, 2025 @04:40PM (#43587397)
> 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.h...

Re:Why do we need modules at all? by kibwen on Friday April 04, 2025 @04:58PM (#43587539)
And 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.