https://issues.dlang.org/show_bug.cgi?id=24169

--- Comment #5 from Dennis <dkor...@live.nl> ---
(In reply to Walter Bright from comment #4)
> The change to add associative array literals did exactly that. 

A change in the past had an unfortunate side effect. How does this justify
adding a new confusing rule? Imagine someone wrote this:

```
auto x = 
[
0: 10, 
4: 40,
];

void main()
{
    x.byKeyValue.each!writeln;
}
```

Then one day someone adds an entry:
```
auto x = 
[
0: 10, 
4: 40,
5: 50,
];
```

With the proposed scheme, x would suddenly change type resulting in errors like
`Error: none of the overloads of template `object.byKeyValue` are callable
using argument types `!()(int[])`. How is the programmer supposed to know what
happened here?

--

Reply via email to