Andrew Wiley wrote:
I've been following this thread on and off, but is there a definition somewhere of exactly what "const" means in D2 and exactly what that guaranties or doesn't guaranty?
Const provides a read-only "view" of a reference and anything reachable through that reference. It guarantees that no other thread can read or write that reference or anything reachable through it.
It does not guarantee that there isn't a mutable alias to that reference elsewhere in the same thread that may modify it.