Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!att!ulysses!andante!alice!bs From: bs@alice.UUCP (Bjarne Stroustrup) Newsgroups: comp.lang.c++ Subject: Re: C++ Parameterization Progress? Summary: no delegation Message-ID: <9523@alice.UUCP> Date: 23 Jun 89 14:11:08 GMT References: <6590158@hplsla.HP.COM> <9511@alice.UUCP> Distribution: comp Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 30 Dirk Grunwald @ University of Illinois, Urbana-Champaign writes: > Along the same lines of parameterized types, is ``delegation by pointer'' > ever going to be sanctioned? Not soon, maybe never. > Not having this is, in my book a big loss for C++. It leads to needless > duplication of classes and ambigious interface bindings. I really like the concept and see many good uses for it. I implemented it and I and several of my friends tried it out. To my surprise, we all got ourselves into serious messes using it. This led to the observation that `delegation is the goto of data structures.' Naturally, this may not have been a fault of the delegation concept as such but a flaw in my design for C++ (see `Multiple Inheritance for C++' Proc EUUG comference, May'87, Helsinki). I suspect the latter, but since I don't know exactly what went wrong I will need much time to experiment before putting delegation into the language. > If you need examples of why this is useful, I can provide them. > In each case, you are able to provide an equiv. interface by introducing > new classes (if I grok the MI rules), but it's gratitous introduction > of classes. It is better to have `gratuitous classes' than flawed or gratuitous language features.