Thread overview | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
September 09, 2013 What's about virtual? | ||||
---|---|---|---|---|
| ||||
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. |
September 09, 2013 Re: What's about virtual? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Namespace | 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. T -- Turning your clock 15 minutes ahead won't cure lateness---you're just making time go faster! |
September 09, 2013 Re: What's about virtual? | ||||
---|---|---|---|---|
| ||||
On 9/9/13, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
> And even then, it may anger a lot of existing users.
I'm not sure about that. It seems people who actually write class-based code would prefer to have this (that's my limited analysis of IRC comments :p).
|
September 09, 2013 Re: What's about virtual? | ||||
---|---|---|---|---|
| ||||
On Mon, Sep 09, 2013 at 09:52:21PM +0200, Andrej Mitrovic wrote: > On 9/9/13, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote: > > And even then, it may anger a lot of existing users. > > I'm not sure about that. It seems people who actually write class-based code would prefer to have this (that's my limited analysis of IRC comments :p). Well, then I stand corrected. :) T -- What do you get if you drop a piano down a mineshaft? A flat minor. |
September 09, 2013 Re: What's about virtual? | ||||
---|---|---|---|---|
| ||||
On 9/9/13, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
> Well, then I stand corrected. :)
You may sit. You get a D.
|
September 09, 2013 Re: What's about virtual? | ||||
---|---|---|---|---|
| ||||
On Mon, Sep 09, 2013 at 10:05:18PM +0200, Andrej Mitrovic wrote: > On 9/9/13, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote: > > Well, then I stand corrected. :) > > You may sit. You get a D. Just what I needed: another D in programming. :-P T -- A computer doesn't mind if its programs are put to purposes that don't match their names. -- D. Knuth |
September 09, 2013 Re: What's about virtual? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | On Monday, 9 September 2013 at 19:52:34 UTC, Andrej Mitrovic wrote:
> On 9/9/13, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
>> And even then, it may anger a lot of existing users.
>
> I'm not sure about that. It seems people who actually write
> class-based code would prefer to have this (that's my limited analysis
> of IRC comments :p).
So then: what's the matter? When does it starts? ;)
It is much more important than those unnecessary DIP's like 47 / 48.
|
September 09, 2013 Re: What's about virtual? | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Monday, 9 September 2013 at 19:48:50 UTC, 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.
>
>
> T
Even if it would break code, the introducing of the virtual keyword could be done without. The change of virtual by default -> final by default could be done after the introducing.
|
September 10, 2013 Re: What's about virtual? | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | 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. > > > T 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. Andrei |
September 10, 2013 Re: What's about virtual? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | 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. |
Copyright © 1999-2021 by the D Language Foundation