What is the correct use of auto?

BCS ao at pathlink.com
Sat Apr 12 17:35:20 PDT 2008


Reply to Robert,

> Unknown W. Brackets wrote:
> 
>> I completely disagree.  Especially when your dogfood is good, you
>> should share it and not horde it for yourself.
>> 
>> Teaching newbies to program differently than you think is best seems
>> wrong to me.
>> 
>> -[Unknown]
>> 
> I was thinking of "newbies to the library" instead of "newbies to the
> language". It's good practice in the language, but I remember trying
> to use a Mango servlet and spending an hour looking up what types were
> returned by functions in examples so I could figure out how to extend
> & change the example code.
> 

quick, ugly (and slightly profain).

template WT_TypeIsThis(T)
{
   pragma(msg,T.stringof)
}

use like this:

WT_TypeIsThis! (typeof(someFnc());  // man I like D's template Syntax!!!!!!!





More information about the Digitalmars-d mailing list