Template context

Bill Baxter dnewsgroup at billbaxter.com
Mon Jan 8 14:25:00 PST 2007


Daniel Keep wrote:
> Marcin Kuszczak wrote:
>> ohhh.. please... do not make another strange _context object!
>>
>> Personally I think that passing information about variadic arguments of
>> function with _arguments and _argptr is black side of D... To get it work
>> properly IMHO there should be build in variant type (which is really
>> usefull in some cases) and arguments to variadic functions could be 
>> sent in
>> standard way:
>>
>> void varfunction(variant[] vals ...); // Same syntax like D typesafe
>> variadic functions.
> 
> I've never liked the "magic" _arguments and _argptr.  I always thought 
> they should be explicitly named.

Amen to that.  _arguments and _argptr are a serious wart on D.

My rant and proposed fix on the topic are here:
http://www.prowiki.org/wiki4d/wiki.cgi?BillBaxter

Search for "varargs" on the page.

--bb



More information about the Digitalmars-d mailing list