On 1/12/2015 11:30 AM, Russel Winder via Digitalmars-d wrote:
Go has an interesting solution, key lookup in a map return a pair
(result, ok), if lookup succeeded then result is the associated value,
if ok is false then result is undefined. I quite like this.


That's just putting the responsibility of array bounds checking on the caller.

Would you want (result, ok) returned every time you indexed an array? I sure wouldn't. An associative array isn't conceptually any different.

Reply via email to