Starting with magic initialisation then...
Is it vital that e[nonexistentKey] throw a RangeError, or could it just
always return the type's default value if the key is absent?
If you change that, then you can make assignment evaluate the RHS fully
before even creating the LHS entry, and you won't in the process break
the common case where people want to go
count[key]++;
or
array[key]~=element;
without worrying about whether it's the first time for that key or not.
Users who want to know if the entry is there could then use 'in' (once
it's fixed).
On 18/02/2012 04:13, Daniel Murphy wrote:
Yeah, but that requires a design that fixes everything, including literals,
template arg deduction, magic initialization etc.
"Jonathan M Davis"<[email protected]> wrote in message
news:[email protected]...
On Saturday, February 18, 2012 14:46:21 Daniel Murphy wrote:
Yes, that's the issue I'm talking about. In this case no comments means
no
disagreements. Unfortunately it requires changes to the AA api/codegen
to
fix, so it will probably be around until we move AAs completely into
druntime.
Which should probably be sorted out sooner rather than later given all of
the
bugs involved.
- Jonathan M Davis