Associative arrays - non-intuitive 'in' semantics

Ben Davis entheh at cantab.net
Sat Feb 18 03:53:05 PST 2012


On 18/02/2012 03:04, Andrej Mitrovic wrote:
> AA's seem to be full of bugs. You shouldn't be able to use a mutable
> keytype. For now your best option is probably to just use string as
> the key type.

Another thought here actually:

Static arrays have value semantics, so char[4] is no more mutable than 
int would be. So if I'm required to write

Chunk[immutable(char[4])]

then I should also be required to write

Chunk[immutable(int)]

which clearly isn't the case.


More information about the Digitalmars-d mailing list