
christopher diggins wrote:
"Arkadiy Vertleyb" <vertleyb@hotmail.com> wrote in message news:da11a6$k4a$1@sea.gmane.org...
"Joel de Guzman" <joel@boost-consulting.com> wrote
I need one now. I dislike the macro-based Interface Definition Language, however. I find it utterly ugly especially because interfaces should be immediately readable. IMO, the macro-based IDL is not. Here's another take (prototype) at a macro less implementation of the interfaces (see attached). Tested on VC7.1, g++ and Comeau. The biggest advantage is that the same C++ member function interface syntax is retained. This makes it very easy to understand and even allows documentation extraction tools like Doxygen to work as usual. A disadvantage is that there is some unavoidable redundancy-- a lesser price to pay, IMO.
WOW! That's very impressive!
Hey, thanks!
How is the run-time and compile-time performance?
Run-time = same; uses the same techniques, but places the function pointers in a tuple so I can inspect them. compile-time = uses tuples. Compared to the quick prototype you wrote (based on Dave A?) for which this is based, this is definitely heavier (more abstractions). But not much, compared to, say, spirit, or phoenix.
Structural subtyping (implicit interface implementation) is the lynchpin of the Heron programming language design, but as of yet has remained unimplemented. This may make it much easier for me to finish a Heron to C++ translator, so I am particularly interested in Joel's work!
Keep up the superlative work Joel.
Oh you too of course! :) Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net