duck!

Russel Winder russel at russel.org.uk
Sat Oct 16 07:26:22 PDT 2010


On Sat, 2010-10-16 at 15:25 +0300, Max Samukha wrote:
> On 10/16/2010 10:30 AM, Christof Schardt wrote:
> >> auto d = duck!Drawable(c); // awes
> >
> > What about "as" ?
> >
> > auto d = as!Drawable(c);
> >
> > Christof
> >
> >
> 
> Nice name. It can be confused with the dynamic cast operator by some C# 
> users but that is probably a non-issue.

Groovy uses as as a conversion operator.  cf.

        def x = [ run : { println ( 'Hello World.' ) } ] as Thread
        x.start ( )


-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101016/d24fbd74/attachment.pgp>


More information about the Digitalmars-d mailing list