July 12, 2012
On Thu, 12 Jul 2012 03:18:51 -0400, Christophe Travert <travert@phare.normalesup.org> wrote:

> "David Piepgrass" , dans le message (digitalmars.D:172007), a écrit :
>> @mutating class B : A
>> {
>>     private int _x2;
>>     public @property override x() { return _x2++; }
>> }
>
> A fun() pure;
>
> You can't cast the result of fun to immutable, because it may be a B
> instance.

Yes.  To complete the point, since you have no idea what has derived from A, it can never be done for non-final objects.

-Steve
July 15, 2012
On Monday, 9 July 2012 at 08:05:01 UTC, Guillaume Chatelet wrote:
>
> Congrats :)

+1 The D community is awesome, and is getting better everyday.

July 15, 2012
On Wednesday, 11 July 2012 at 00:20:32 UTC, Timon Gehr wrote:
> I for one would be satisfied if inheriting from object became optional:
>
> // object.di
> class RawObject /+ this is the root of the class hierarchy +/{ }
> class SynchronizableObject : RawObject { void* monitor; }
> class Object : SynchronizableObject {
>      const { stuff }
> }
>
> // user code
> class NoCruft : RawObject {
>     // ...
> }

At first sight, I think this is an interesting idea. Maybe the class hierarchy needs to be rethought for more flexibility ?
8 9 10 11 12 13 14 15 16 17 18
Next ›   Last »