Hacker News new | past | comments | ask | show | jobs | submit login

Plain `pub` was concise and local and simple. :<



I think I saw something about a lint for bare `pub` that isn't visible to the user. I think one of the intents is to make it easier to audit for what is publicly exposed and what isn't.

Found it: https://github.com/rust-lang/rust/issues/45521


Yeah, that's gonna be seriously annoying. :/


Plain `pub` actually isn't quite local, and that's part of the confusion that `crate` is intended to address.

There's also the confusion of looking at a `pub` declaration and not knowing whether or not it's visible to the parent module or visible to the world- at which point maybe you don't want a purely local visibility mechanism.


Nah it's extremely local, that's why everybody is mad at it


You can do that too! pub isn’t going away.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: