On 1/20/06 3:00 PM, Alexey Proskuryakov didst favor us with:
> On Fri, 20 Jan 2006 12:51:42 -0500 Laurence Harris <email@hidden> wrote:
>
>>> Format strings even support reordering of arguments.
>> When would you use this with localized strings?
>
> Replaced parts don't always go in the same order in different languages. As
> Apple documentaion nicely puts it,
>
> "%@ Error! %@ failed!" = "%2$@ blah blah, %1$@ blah!";
Sorry, I misunderstood something when I read it.
>> The use of format strings is a fine mechanism, but in my case I use the same
>> system I implemented back when I was using Pascal, before format strings
>> were even an option.
>
> Was using CFStringCreateMutableCopy() a problem in your case? It certainly
> shouldn't have been such from the performance point of view -
I haven't noticed anything significant, it just seems inefficient to copy
the localized string, copy it to a mutable string, then release the first
copy instead of having the system do a get on the localized string and make
the mutable copy for you.
> and, after all,
> search and replace is slower than using a format string anyway.
>
> You asked why there was no function to create mutable strings from .strings
> files directly. Obviously, I am not aware of how that decision was made, but
> there doesn't appear to be any reason to call it wrong (of course, if the
> answer to the question above is "no").
I haven't called it wrong, I'm just wondering why.
Frankly, the whole mutable/immutable thing seems confusing at times. For
example, what's the point of specifying a capacity when creating a mutable
CF object? I've never been able to detect a performance different when
specifying a maximum capacity. Do the immutable variants offer any
advantages over their mutable counterparts?
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden