class extensions
kris
foo at bar.com
Wed Aug 29 12:08:06 PDT 2007
Michael Deardeuff wrote:
> Robert Fraser Wrote:
[snip]
>> I proposed this a while ago, and I agree this would be a good idea. However, the more I think about it, the more I realize that in a native-compiled language we're talking vtable problems - how do we know when the vtable is finished? If partials are cross-module, it would require recompilation of every involved module, and just be generally problematic.
>
> Excellent point. Blast.
> I think it still _is_ a good idea if you scrap the inheritance/vtable problem and only allow extension classes to use the syntax "a.foo(...);"
> I guess what I'm getting at is, I don't like the prospect of working with code that in one line is "foo(a, ...);" and the next "a.foo(...);" With the extension class bit it makes it clear that only methods meant as a class extension can (and must) use the "a.foo();" syntax, which I prefer.
> And, of course, I'm in here for myself. j/k. But not really.
>
> --Michael Deardeuff
Yeah, the proposed extensions raised all kinds of red flags for me at
the conference.
Bluntly, it felt like the notion of "structured programming" was being
tossed out in favor of "slapdash programming" ... a brand new paradigm
to go along with the other(s) being adopted :)
More information about the Digitalmars-d
mailing list