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

The compiler knew next to nothing about the memory model before we started annotating lifetimes. Annotating effects is a potentially reasonable next step.

(I say "potentially", because even just annotating lifetimes is already considered a DX nightmare by a lot of people)



> The compiler knew next to nothing about the memory model before we started annotating lifetimes.

Compilers for garbage compiled languages have always had to reason about the memory model. Compilers for languages with obligatory bounds checks have always had to reason about the memory model. Compilers for multi-threaded languages have always had to reason about the memory model. Even "good old C" compilers had to reason about the memory model when it came to volatile variables. Rust didn't invent the concept of a memory model, and Rust's lifetimes are only a small part of its memory model.




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

Search: