Implicit conversions for AA keys

Timon Gehr timon.gehr at gmx.ch
Fri Mar 23 13:23:39 PDT 2012


On 03/23/2012 09:05 PM, Andrei Alexandrescu wrote:
> On 3/23/12 2:28 PM, Timon Gehr wrote:
>> On 03/23/2012 08:06 PM, Andrei Alexandrescu wrote:
>>>
>>> Casting is very different from to, and useless for your purposes. You
>>> must use to.
>>>
>>>
>>> Andrei
>>
>> druntime mustn't depend on Phobos, and I don't see why it is necessary.
>> What kind of functionality do you want to provide that depends on
>> std.conv.to ?
>
> Casting from char[] to string is not what you want, and .idup is
> specific to arrays. There must be one coherent method of "truely"
> converting across types, and std.conv.to is the closest I can think of.
>
> Andrei

This will statically allow looking up an int in a T[string].
I don't think that is desirable. I even think implicit .idup may be 
overkill.


More information about the Digitalmars-d mailing list