DMD 2.066 Alpha

deadalnix via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Jun 13 14:15:35 PDT 2014


On Friday, 13 June 2014 at 20:52:17 UTC, Kapps wrote:
> On Friday, 13 June 2014 at 20:29:46 UTC, deadalnix wrote:
>> On Friday, 13 June 2014 at 17:12:44 UTC, Steven Schveighoffer
>> wrote:
>>> On Fri, 13 Jun 2014 12:49:32 -0400, Andrei Alexandrescu 
>>> <SeeWebsiteForEmail at erdani.org> wrote:
>>>
>>>> Virtual by default will not change. Being able to negate the 
>>>> "final:" label is nice to have but not a must. Adding a 
>>>> keyword for that doesn't scale - it would mean we'd need to 
>>>> add one keyword to undo each label.
>>>
>>> To that end, I thought we were moving towards a more scalable 
>>> solution: like !final or final!false or final(false), which 
>>> could be nice for metaprogramming.
>>>
>>> -Steve
>>
>> Yes that was the decision, and with the advantage that the
>> parameter can be computed at compile time.
>
> I honestly don't see this as a noticeable advantage, at least in
> the case of final. Not to mention you could just use "static
> if(dovirtual) { result ~= "final(false)"; }".

That is a plus for generic code, and that work for virtual.

So there is reason to use something specific for virtual.
Consistency is a plus in its own right. Coming up with ad hoc
solution to every problem is an absolutely terrible way to design
a programming language.


More information about the Digitalmars-d-announce mailing list