DMD 0.177 release
Reiner Pope
xxxxxx at xxx.xx
Wed Dec 20 03:49:40 PST 2006
Andrei Alexandrescu (See Website for Email) wrote:
> 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) { }
> 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.
The motivation I see for such a shortcut is that this template pattern
is used so often that it is worth simplifying. Furthermore, the
variables S and T are often just dummy variables to satisfy the
requirements of the template; you don't even need these symbols, and
they fill the namespace.
Cheers,
Reiner
More information about the Digitalmars-d-announce
mailing list