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

What sort of logic errors would be possible? The slice cannot be mutated, and the compiler has verified for me that nobody else is mutating it.

I was just holding on to a reference for an API to consume.

Of course, in more complicated situations you need to worry about logic errors. But in this case I was pretty sure I didn't have anything to worry about.

Still you never have to worry about memory unsafety, which is a huge cognitive load off my mind. Similar to how you don't have to worry about some types of memory unsafety in languages like Java. Or how most programmers don't worry about cache coherence since the processor handles it. Rust just raises the bar. If you know what it can and can't prevent, you can be carefree about many things.



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

Search: