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

Hence why D has two approaches with similar semantics, const and immutable.

And also allows to alias non const references to the same data.

Thus the data can be modified by a mutable reference, owned by a specific part of the code, while everyone else only gets to see the const chain.



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

Search: