Rant after trying Rust a bit

Tobias Müller via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 25 11:33:32 PDT 2015


Walter Bright <newshound2 at 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


More information about the Digitalmars-d mailing list