Suggestion: auto templates
Trevor Parscal
Trevor_member at pathlink.com
Sun Feb 19 02:48:29 PST 2006
In article <dt9fqs$1v1h$1 at digitaldaemon.com>, bobef says...
>
>It would be nice if there were something like auto templates. I.e. if we
>have something like:
>
>template mytemplate(_type)
>{
> int foo(_type[] ar);
> int boo(_type ar);
>}
>
>
>and type something like
>
>char[] a;
>foo(a);
>//or even
>mytemplate.boo(a[0]);
>
>DMD could autodetect the type and we won't need to specify the type
>every time manualy.
This is a bit ambiguous in actual practice IMHO - but... I also can see how this
would be awesome - when this ambiguity would be desired.
Thanks,
Trevor Parscal
More information about the Digitalmars-d
mailing list