duck!

Peter Alexander peter.alexander.au at gmail.com
Sat Oct 16 09:25:15 PDT 2010


On 16/10/10 4:24 PM, Juanjo Alvarez wrote:
> On Sat, 16 Oct 2010 09:30:27 +0200, "Christof Schardt"
> <csnews at schardt.info> wrote:
>> auto d = as!Drawable(c);
>
> My turn:
>
> auto d = implements!Drawable(c);

That doesn't really work. If I saw that, I would assume that 
"implements" returns a boolean true when c implements the Drawable 
interface, rather than returning an object that does implement the 
interface.

Out of all of them, I like "as" the best, although people might confuse 
it with the "as" casting operator in C#.


More information about the Digitalmars-d mailing list