D for embedded system

Jacob Carlborg doob at me.com
Sun Nov 18 02:30:33 PST 2012


On 2012-11-18 00:07, maarten van damme wrote:

> Why wasn't opted for making opIndex overloadable with other objects so
> AA's could be moved out of druntime and in phobos?

One reason for why AA's are in druntime is for the syntax sugar:

int[string] aa;

If the AA's where only in Phobos, this would be the syntax:

AssociativeArray!(string, int) aa;

Originally there were much more code in the compiler for handling 
associative arrays. Then, not that long a go, there was a rewrite that 
tried to move as much as possible to druntime instead.

-- 
/Jacob Carlborg


More information about the D.gnu mailing list