D - Interfaces implementation proposal for D
- christopher diggins (12/12) Apr 09 2004 I do not know exactly how D currently implements interfaces, but I assum...
- Kris (13/25) Apr 09 2004 That looks interesting ... I sometimes toy with the notion that D might
I do not know exactly how D currently implements interfaces, but I assume it uses the common method of using vtables. If this is the case then this post might be of interest to this group. I have developed a proposal for interfaces in C++ which uses fat pointers for interface references and significantly outperforms comparable designs using Abstract Base Classes. The demonstration program, source code and explanation of technique is available online at: http://www.heron-language.com/heronfront.html -- Christopher Diggins http://www.cdiggins.com http://www.heron-language.com
Apr 09 2004
That looks interesting ... I sometimes toy with the notion that D might expose *any* external D class, or set of external classes, (such as those in a DLL) as an Interface or set thereof. The latter instances would be auto-generated by the compiler, perhaps using a command-line flag. It just strikes me that Interfaces would be ideal for such use. They are, after all, a mechanism for hiding the concrete implementation (meaning source-code). If Interfaces were also to provide performance benefits, it might add weight to the approach. - Kris "christopher diggins" <cdiggins users.sourceforge.net> wrote in message news:c56j50$2q6f$1 digitaldaemon.com...I do not know exactly how D currently implements interfaces, but I assumeituses the common method of using vtables. If this is the case then thispostmight be of interest to this group. I have developed a proposal for interfaces in C++ which uses fat pointers for interface references and significantly outperforms comparable designs using Abstract Base Classes. The demonstration program, source code and explanation of technique is available online at: http://www.heron-language.com/heronfront.html -- Christopher Diggins http://www.cdiggins.com http://www.heron-language.com
Apr 09 2004