More magical AA semantics

Jonathan M Davis jmdavisProg at gmx.com
Fri Jan 11 01:19:15 PST 2013


On Friday, January 11, 2013 10:03:54 Don wrote:
> That's my feeling too. I think that if we want to implement AAs
> as a library type, we first need to eliminate all of the
> semantics would be impossible to implement in a library.

Well, the AAs are _already_ a library type. That's a large part of why they 
have so many bugs. The transition to a library type was badly done, and we 
sorely need a new implementation. Also, because the compiler is generating 
hooks that druntime plugs into, the built-in AAs aren't restricted to quite 
the same semantics that a user-defined AA type would be, even though the AAs 
are implemented in druntime instead of the compiler.

So, AFAIK, we don't really have a problem with the built-in AAs doing stuff 
that a library type can't do (that's not even possible at this point, because 
they're implemented with a library type). Rather, what we need is a new, 
properly templated solution. But that's a lot of work, and I believe that the 
last person who attempted it gave up on it beacuse of all the problems that he 
was running into.

- Jonathan M Davis


More information about the Digitalmars-d mailing list