DMD 0.177 release
Andrei Alexandrescu (See Website for Email)
SeeWebsiteForEmail at erdani.org
Wed Dec 20 03:41:44 PST 2006
Lionello Lunesu wrote:
> Andrei Alexandrescu (See Website for Email) wrote:
>> Kevin Bealer wrote:
>>> == Quote from Andrei Alexandrescu (See Website For Email)
>>> ...
>>>> That remains to be seen, but I think the buck stops at functions. The
>>>> problem of duplicating templates for inout (lvalues) and rvalues
>>>> stays, but I have an idea about that, that I might tell about
>>>> tomorrow.
>>>>
>>>> Andrei
>>>
>>> Did you ever work out how to do this lvalue/rvalue idea?
>
> <snip>
>
> I'd like "auto" to appear on more places as it will make templates more
> accessible than ever before. For example, this notation has been
> suggested a couple of times:
>
> void func(auto x) { }
Thanks for the kind wishes. One problem I see with the shortcut above is
that the notation does not clarify whether "auto" catches both the type
and the storage class. Even if it does, more linguistic machinery is
needed to extract the type and storage class of x and to properly
transport them, if needed, to the return type.
So in the end the "auto" suggestion is a mere shortcut for:
void func(S T)(S T x) { }
with the difference that the storage and type entities are clearly bound
to symbols, style that's more in the spirit of D.
Andrei
More information about the Digitalmars-d-announce
mailing list