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

As someone who doesn't think it is pretty, but knows Rust I went through all your points and let me assure you except for the one where you wonder why the syntax can't be more like C/C++ where it comes down to taste, all of your questions have an answer that really makes sense if you understand the language.

E.g. making pub default is precisely the decision a language would make that values concise code over what the code actually does.



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: