Testing some singleton implementations
Jacob Carlborg
doob at me.com
Fri Jan 31 03:53:34 PST 2014
On 2014-01-31 12:27, Andrej Mitrovic wrote:
> AFAIK D1's final was equivalent to D2's immutable. But I maybe
> remembering that wrong.
In D2 if if a variable is immutable or const you can not call non-const
non-immutable methods via that variable. D1 didn't have any concept of
this. "const" and "final" in D1 as more, you cannot change this variable.
> Or maybe D2 initially used final before
> settling for the new keyword immutable, to avoid confusion by users.
D2 used "invariant" before it used "immutable". It also changed the
meaning of "const" compared to D1.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list