Walter Bright <newshou...@digitalmars.com> wrote: > On 7/23/2015 10:39 PM, Tobias Müller wrote: >> You may aus well ask "How do interfaces in OO programming deal with this?". > > It's a good question. And the answer is, the top level function does not > list every interface used by the call tree. Nested function calls test at > runtime if a particular interface is supported by an object, using > dynamic casting or QueryInterface() calls. It's fundamentally different > from traits and concepts.
IMO dynamic casting or QueryInterface() is a sign of bad design. But then again, I also like exception specifications, at least the way Java does it. In C++ they're pointless, that true. Tobi