Automatic Inference for Both Key and Value Types of an Associative Array

Meta via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 7 11:40:39 PDT 2014


On Thursday, 7 August 2014 at 17:37:54 UTC, Daniel Murphy wrote:
> "Meta"  wrote in message 
> news:ohzzgcslkthrozimfiwd at forum.dlang.org...
>
>> Something H.S. Teoh in a recent pull request in Github got me 
>> thinking that it would be useful in some cases to tell the 
>> compiler that you want to automatically infer the either the 
>> key type or value type of an AA. Something like the following:
>
> How often do you actually want to do this?  At best it's a 
> bunch of weird partial type special cases in the compiler.

Isn't that also the case for the auto*, const[], immutable[$], 
etc. syntax? Conceptually it feels the same to me as Kenji's 
enhancement; I don't know enough about the compiler to talk about 
it technically.


More information about the Digitalmars-d mailing list