When are associative arrays meant to throw a RangeError?
entheh at cantab.net
Sat Feb 18 15:11:17 PST 2012
To be clear, I'm not too bothered how associative arrays work. My
proposal was merely a means by which the following currently working code:
could continue to work without relying on a current implementation
If you want to change it not to work and make people's existing code
crash, you can :)
On 18/02/2012 23:08, Ben Davis wrote:
> On 18/02/2012 22:57, Andrej Mitrovic wrote:
>> Are you familiar with cases where you want regular arrays to return
>> Type.init when you go out of bounds?
> The front page says D isn't meant to be an orthogonal language :P
> If you want orthogonality, then associative arrays will have to work
> something like this:
> int[string] stuff;
> stuff["c"]=2; //error
> writefln("%s",stuff["f"]); //error
> Do you want to do that?
More information about the Digitalmars-d