Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Definitely agree, “pub” was one of the design decisions I loved learning Rust. If you forget to add it, you’ll get a compiler error. But if pub was default, I’d be exposing code unnecessarily. And no need for a separate private keyword, the absence of pub is sufficient.

The same reasoning works for “mut” as well.

That said, I don’t like Rust’s syntax. Especially once you get to lambdas, things get hard to read.



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

Search: