On Fri, 13 Jun 2014 12:00:39 -0700
Andrei Alexandrescu via Digitalmars-d-announce
> On 6/13/14, 10:15 AM, Nick Sabalausky wrote:
> > On 6/13/2014 12:49 PM, Andrei Alexandrescu wrote:
> >> 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.
> > No it doesn't mean that. "virtual" is very well established
> > industry-wide as the anti-final. Just because we accept that does
> > not mean we can't still do @~pure, @nothrow(false) or whatever for
> > the ones which don't already have well-established names.
> I don't see it necessary to add the "virtual" as a keyword to D. --
If we were going to go with final by default, then adding virtual would make a
lot of sense IMHO - especially given that's what people expect from other
languages and the fact that virtual would the likely be used far more often
than final. Without that however, marking a function as virtual becomes a lot
less critical, and it becomes a question of whether the familiarity of using
virtual instead of !final or final(false) (or whatever we come up with) is
worth adding another keyword and having it in addition to !final or
final(false) or whatever (since presumably, we'd still need that for generic
code even with virtual). And actually, having virtual would then open the door
for !virtual or virtual(false) or whatever in addition to !final or
final(false), etc. So, while having virtual would be nice, it's probably
complicating things too much from the user's perspective when combined with
the ability to explicitly negate attributes.
- Jonathan M Davis