January 26, 2019 [Issue 19620] Not quite sure what immutability means | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19620 Neia Neutuladh <dhasenan@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dhasenan@gmail.com --- Comment #1 from Neia Neutuladh <dhasenan@gmail.com> --- "immutable applies to data that cannot change. Immutable data values, once constructed, remain the same for the duration of the program's execution." It seems extremely clear to me that "cannot change" is not the same as "could never and did never change". "Creating Immutable Data ... The second way is to cast data to immutable. When doing so, it is up to the programmer to ensure that no other mutable references to the same data exist." Since "construct" and "create" are synonyms, it seems rather clear that the spec does not intend to forbid casting previously mutated values to immutable. If you want to make the spec more explicit, please submit a pull request. -- |
January 26, 2019 [Issue 19620] Not quite sure what immutability means | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19620 Neia Neutuladh <dhasenan@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME -- |
Copyright © 1999-2021 by the D Language Foundation