On 11/8/13 10:43 PM, Oren Ben-Kiki wrote:
Looking at the same thread, I see nobody asked about a possibility of
keeping the existing rules, but also adding a "friend" keyword at the
module level; that is, if a module foo says "friend mod bar", then the
module bar can access any private stuff in the module foo. I'm not very
enamored of the friend keyword in C++, but it seems to me that having it
only in module level greatly simplifies things. Also, in a Rust context,
it seems it would cut down on much of the boilerplate code needed by
barrier modules (which is not to say that re-exporting isn't a very
useful feature as of itself).

I don't want to re-open old discussions - is this something that was
considered and rejected before?

Nobody has proposed it AFAIK. I personally think it's not likely to be a Rust 1.0 feature, but I wouldn't necessarily be opposed in general.

Patrick

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to