What's about virtual?

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Sep 9 20:07:12 PDT 2013


On Mon, Sep 09, 2013 at 05:28:24PM -0700, Andrei Alexandrescu wrote:
> On 9/9/13 12:47 PM, H. S. Teoh wrote:
> >On Mon, Sep 09, 2013 at 09:37:07PM +0200, Namespace wrote:
> >>It's been a while since Manu convinced Walter and Andrei to
> >>introduce a virtual Keyword and to change the default from virtual
> >>methods to final methods.  Anything new? Anybody working on that? I
> >>would love to see that soon.
> >
> >This is going to break a lot of code. We'd need some kind of
> >deprecation path. And even then, it may anger a lot of existing
> >users.
[...]
> After I've seen a pretty cool demo of clang-modernize
> (http://clang.llvm.org/extra/ModernizerUsage.html), I think the best
> way to attack this and similar problems is to add a class hierarchy
> analyzer: a command-line utility that is fed an entire project and
> adds as many 'final' as possible without changing semantics.
> 
> Time has come to migrate such functionality to tools. We keep on
> telling that "nobody uses the tools" but it seems experience
> contradicts that belief.
[...]

This would also be a good use case to motivate a reusable lexer/parser
(e.g., std.d.lexer that has been suggested for review).


T

-- 
Some days you win; most days you lose.


More information about the Digitalmars-d-learn mailing list