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

If anything the cognitive load of rust is worse than C++


Rust is certainly challenging, even copilot finds it difficult to write correct rust, it's fun to see the AI fight the compiler.


I guess the way I feel about using rust is kind of the opposite of how I feel about using Go. Go has such plain and straightforward semantics that it’s very easy to make simple, straightforward packages with it. It is actually even simpler than Python. In C++, it’s a pain to get there, but those simple anbstractions are still at least _possible_. In Rust, the nuances of the semantics are not only convoluted, but also very hard to encapsulate and abstract over. It’s not that the abstractions leak quite as much as it is that the nuances of the semantics are inextricably and necessarily _part of the package API_.

It could probably be argued that this is simply acknowledging reality, and that C++ lets you get away with murder if you want to. But maybe that’s what I want.

I think a good feature for C++ would be a “safe” (or “verified”?) block or method decorator that could enforce some set of restrictions on semantics, e.g. single mutable borrow. The problem is that those functionalities are part of the compiler APIs and not standardized.

The Rust compiler is also not standardized, but they can get away with it.




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

Search: