Does D have too many features?

David Nadlinger see at klickverbot.at
Sun Apr 29 01:22:44 PDT 2012


On Sunday, 29 April 2012 at 08:20:59 UTC, Jonathan M Davis wrote:
> The compiler doesn't necessarily know that foo won't remove key 
> from aa, so it
> can't save the result of key in aa to reuse rather than calling 
> aa[key],
> whereas the programmer could know that foo doesn't do anything 
> to aa which
> would make a pointer to the element invalid and can guarantee 
> that only one
> lookup occurs by doing
> […]

Yes, point taken, but what does this have to do with locality?

David


More information about the Digitalmars-d mailing list