D - Interface feature request
- Charles Hixson (16/16) Mar 11 2004 I would like it if a mechanism were added to allow an interface to
I would like it if a mechanism were added to allow an interface to specify that it was implemented by certain classes. That way if the interface were written after the class (to which one, perhaps, did not have the source) one could still denote at interface build time that certain class(es) implemented the interface. An advantage here is that code could be developed *AS IF* one had access to the complete source. Logically the structure of the program would be the same as if each class specified which interfaces it implemented, but functions could be written that operated on all applicable classes by specifying the parameters via the interfaces that they needed. This would allow a logically complete multiple inheritance to be available within an implemented single inheritance structure. (The current system is complete only if one has the complete source code, and can make changes to the classes so that one says that they implement an interface that may not have been thought of at the time they were originally written.)
Mar 11 2004