digitalmars.D - Immutable
- Bill Baxter (11/11) Oct 20 2008 This works now in D2!
- Moritz Warning (2/17) Oct 20 2008 I think it's a bug, should be fixed easily.
- Bill Baxter (10/27) Oct 20 2008 Well, immutable doesn't appear anywhere in the Phobos source code yet
- ore-sama (3/9) Oct 21 2008 I also noticed inconsistent syntax of unittest and invariant: they have ...
This works now in D2! ----- import std.stdio; void main() { immutable(char)[] bar; writefln("bar is ", typeof(bar).stringof); } ---- But it still prints "bar is invariant(char)[]". Will the internal names change too in the next release? --bb
Oct 20 2008
On Tue, 21 Oct 2008 10:06:03 +0900, Bill Baxter wrote:This works now in D2! ----- import std.stdio; void main() { immutable(char)[] bar; writefln("bar is ", typeof(bar).stringof); } ---- But it still prints "bar is invariant(char)[]". Will the internal names change too in the next release? --bbI think it's a bug, should be fixed easily.
Oct 20 2008
On Tue, Oct 21, 2008 at 10:27 AM, Moritz Warning <moritzwarning web.de> wrote:On Tue, 21 Oct 2008 10:06:03 +0900, Bill Baxter wrote:Well, immutable doesn't appear anywhere in the Phobos source code yet either. So rather than a bug, I was thinking it was part of a K-part plan to phase in immutable and phase out invariant. Just curious what that plan was. My other question is relevant to that too -- will class invariants return to "invariant { ... }" at some stage in that plan (although I think I got old syntax vs new syntax mixed up in that post -- I have very rarely used class invariants). --bbThis works now in D2! ----- import std.stdio; void main() { immutable(char)[] bar; writefln("bar is ", typeof(bar).stringof); } ---- But it still prints "bar is invariant(char)[]". Will the internal names change too in the next release? --bbI think it's a bug, should be fixed easily.
Oct 20 2008
Bill Baxter Wrote:I was thinking it was part of a K-part plan to phase in immutable and phase out invariant.really?My other question is relevant to that too -- will class invariants return to "invariant { ... }" at some stage in that plan (although I think I got old syntax vs new syntax mixed up in that post -- I have very rarely used class invariants).I also noticed inconsistent syntax of unittest and invariant: they have the same nature but different syntax; even wanted to post bug...
Oct 21 2008