AA key conversion woes
SomeDude
lovelydear at mailmetrash.com
Wed Apr 18 06:06:11 PDT 2012
On Tuesday, 17 April 2012 at 18:51:07 UTC, H. S. Teoh wrote:
> On Tue, Apr 17, 2012 at 08:44:42PM +0200, Andrej Mitrovic wrote:
>> On 4/17/12, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
>> > But even then, I'm considering if .keys should return a
>> > mutable array if
>> > the key is a value type
>>
>> How about having .keys for mutable and .ikeys for immutable
>> returns?
>
> That's one possibility. Then .keys can come with the caveat
> that it may
> involve hidden performance costs in the form of internal
> .dup's. But I'm
> not sure this is a good idea, because there are too many
> string-keyed
> AA's in existing code that will now suddenly become very slow
> because
> they use .keys instead of .ikeys, and the strings are getting
> .dup'd all
> over.
>
>
> T
Hidden duplications are not acceptable in my opinion.
More information about the Digitalmars-d
mailing list