Rant after trying Rust a bit

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 24 19:28:47 PDT 2015


On Saturday, 25 July 2015 at 01:22:15 UTC, Tofu Ninja wrote:
> On Saturday, 25 July 2015 at 00:49:38 UTC, Walter Bright wrote:
>> On 7/24/2015 2:27 PM, Tofu Ninja wrote:
>> No it isn't. Google QueryInterface(). Nobody lists all the 
>> interfaces at the top level functions, which is that Rust 
>> traits and C++ concepts require.
>
> The only time you don't use the right interface for your needs 
> is if you plan on casting somewhere down the line. But 
> certainly there are people who don't do that, I for one feel 
> it's bad practice to need to use casts to circumvent the type 
> system like that.

I confess that I've always thought that QueryInterface was a 
_horrible_ idea, and that if you need to cast your type to 
something else like that, you're doing something wrong. *shudder* 
I really have nothing good to say about COM actually...

- Jonathan M Davis


More information about the Digitalmars-d mailing list