Configurable syntax

Nick Sabalausky a at a.a
Fri May 22 13:15:47 PDT 2009


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:gv6e4p$1m3f$1 at digitalmars.com...
> bearophile:
>> Having a return also helps to see templates as closer to compile-time 
>> functions (changing few things there may be ways to merge the syntax of 
>> templates with the syntax of compile time functions, reducing the 
>> complexity of D).<
>
> To write some templates as compile-time functions you may need to add a 
> new type to D, named "type":
>
> type foo(type T) {
>    return T[];
> }
>

Yea, that's one thing I kind of miss from the VM languages like C#/Java. I 
been really wanting to see that in D. 





More information about the Digitalmars-d mailing list