News for hackers. Stuff that matters.
Re:Public/protected/private is an unnecessary feature by kmeisthax on Thursday June 19, 2025 @09:50PM (#44324062)
I'm assuming this is akin to Rust's pub(crate) keyword?
Re:Public/protected/private is an unnecessary feature by colejohnson66 on Friday June 20, 2025 @07:36AM (#44326770)
`internal` maps to `pub(crate)`. But there's no analog for `protected` because Rust doesn’t have inheritance.

`private protected` means "only me or anyone inheriting me in this assembly". There's also `protected internal` which means "me, anyone inheriting me, and anyone inside this assembly". An assembly is analogous to a Rust crate.