[Issue 11616] Introduce virtual keyword and remove virtual-by-default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 27 06:58:24 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11616



--- Comment #3 from Manu <turkeyman at gmail.com> 2013-11-27 06:58:10 PST ---
(In reply to comment #2)
> (In reply to comment #1)
> > (In reply to comment #0)
> > > Thread with discussion and Walter-approval:
> > > 
> > > http://forum.dlang.org/thread/yzsqwejxqlnzryhrkfuq@forum.dlang.org?page=28#post-koqkhc:244nn:241:40digitalmars.com
> > > 
> > > 1. Add warning for not marking a virtual method with 'virtual'
> > > 2. Deprecate not marking a virtual method with 'virtual'
> > > 3. Make it an error to not mark virtual methods with 'virtual'
> > > 
> > > At this point, all methods are marked with either 'virtual', 'final',
> > > 'abstract', or 'override' or are implicitly final. (eg template methods,
> > > constructors)
> > > 
> > > 4. Do not require 'final' to mark a function as final. (optional)
> > 
> > Since I already started writing this, I may as well paste it here:
> > http://wiki.dlang.org/DIP51
> > It can be updated if details emerge.
> 
> I updated it.  The warning goes on the introducing method, not on the
> overriding one.  This forces all methods to be correctly annotated, even if
> there are no derived classes.

You mean to disallow an implicit state? So it's not final-by-default, rather,
it MUST be explicitly specified?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list