Re: restructuring name hiding around the notion of hijacking

2009-10-02 Thread Max Samukha
On Fri, 2 Oct 2009 08:54:49 -0400, Michel Fortin wrote: >On 2009-10-02 08:29:09 -0400, Max Samukha said: > >> class Counted { >> mixin(Derived) >> { >> // Insert here stuff that must be "pasted" for each subclass >> // of Counted (including Counted itself). >>

Re: restructuring name hiding around the notion of hijacking

2009-10-02 Thread Andrei Alexandrescu
Michel Fortin wrote: If I could attach my class-related data to the ClassInfo of a specific class (so it could be retrieved at runtime) and if static functions had access to the classinfo of the class they're called from (practically making them member function of the corresponding ClassInfo) t

Re: restructuring name hiding around the notion of hijacking

2009-10-02 Thread Michel Fortin
On 2009-10-02 08:29:09 -0400, Max Samukha said: class Counted { mixin(Derived) { // Insert here stuff that must be "pasted" for each subclass // of Counted (including Counted itself). // Use "Derived" as the name of the current subtype of Counter pr

Re: restructuring name hiding around the notion of hijacking

2009-10-02 Thread Max Samukha
On Thu, 01 Oct 2009 22:52:28 -0500, Andrei Alexandrescu wrote: >Michel Fortin wrote: >> On 2009-10-01 12:29:39 -0400, Andrei Alexandrescu >> said: >> I think it's a good idea, but there should be a way to *override* static functions. >>> >>> That has the same risks. The problem righ

Re: restructuring name hiding around the notion of hijacking

2009-10-02 Thread Michel Fortin
On 2009-10-01 23:52:28 -0400, Andrei Alexandrescu said: Michel Fortin wrote: On 2009-10-01 12:29:39 -0400, Andrei Alexandrescu said: I think it's a good idea, but there should be a way to *override* static functions. That has the same risks. The problem right now is that in order to use

Re: restructuring name hiding around the notion of hijacking

2009-10-01 Thread Andrei Alexandrescu
Michel Fortin wrote: On 2009-10-01 12:29:39 -0400, Andrei Alexandrescu said: I think it's a good idea, but there should be a way to *override* static functions. That has the same risks. The problem right now is that in order to use a class, you must absorb the definition of that class and

Re: restructuring name hiding around the notion of hijacking

2009-10-01 Thread Michel Fortin
On 2009-10-01 12:29:39 -0400, Andrei Alexandrescu said: I think it's a good idea, but there should be a way to *override* static functions. That has the same risks. The problem right now is that in order to use a class, you must absorb the definition of that class and that of each supercla

Re: restructuring name hiding around the notion of hijacking

2009-10-01 Thread Andrei Alexandrescu
Michel Fortin wrote: On 2009-09-30 22:01:54 -0400, Andrei Alexandrescu said: Today's D has a very strong, principled notion of hijacking: for any given function call, if the call candidates are found in different modules, the call is invalid. I think that works great. Lately I've been thin

Re: restructuring name hiding around the notion of hijacking

2009-09-30 Thread Michel Fortin
On 2009-09-30 22:01:54 -0400, Andrei Alexandrescu said: Today's D has a very strong, principled notion of hijacking: for any given function call, if the call candidates are found in different modules, the call is invalid. I think that works great. Lately I've been thinking of using the same