Re: The following code bypasses immutabililty with GDC but not DMD

2013-04-11 Thread Iain Buclaw
On 12 April 2013 01:50, Nicholas Smith wrote: > I don't know how to file bug reports but I'm sure this shouldn't happen :) > > Real gdc bugs get filed here: http://bugzilla.gdcproject.org Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';

Re: The following code bypasses immutabililty with GDC but not DMD

2013-04-11 Thread Iain Buclaw
On Friday, 12 April 2013 at 00:50:03 UTC, Nicholas Smith wrote: I don't know how to file bug reports but I'm sure this shouldn't happen :) DMD gives an error. That's a bug in the frontend, which has since been fixed and merged into gdc. Just how old is your compiler? :)

Re: The following code bypasses immutabililty with GDC but not DMD

2013-04-11 Thread Manu
This is an interesting problem with the ref-is-not-part-of-the-type design. You can't really have a const(ref) in D, and a ref const(int) is kinda backwards logic. I've never understood why ref isn't part of the type... can someone explain why this is a good thing? It seems to cause all sorts of tr

The following code bypasses immutabililty with GDC but not DMD

2013-04-11 Thread Nicholas Smith
I don't know how to file bug reports but I'm sure this shouldn't happen :) DMD gives an error. import std.stdio; void main() { immutable Cat cat = cast(immutable) new Cat(5); happyBirthday(cat.age); writefln("My 5 year old cat is %s years old!", cat.age); } void happyBi