[webkit-dev] When should I use AtomicString vs String?
rniwa at webkit.org
Sat Jun 1 21:50:39 PDT 2013
On Sat, Jun 1, 2013 at 9:09 PM, Glenn Adams <glenn at skynav.com> wrote:
> On Sat, Jun 1, 2013 at 9:56 PM, Darin Adler <darin at apple.com> wrote:
>> On Jun 1, 2013, at 8:54 PM, Glenn Adams <glenn at skynav.com> wrote:
>> > You guys obviously never wrote any Lisp code.
>> Lets not play this game. When I met Maciej he was the maintainer of one
>> of the most popular Scheme implementations, if I remember correctly.
> Sorry, I forgot to add a smiley... :)
> Seriously, if "Atomic" isn't jargon, Intern isn't either.
Neither jargon is good but if we're renaming AtomicString, then the new
name ought be significantly better than the old name because renaming WTF
classes used everywhere has a cost: it makes Subversion history less useful
and adds a churn; people reading the old code need to learn both equally
bad jargons "atomic" and "interned" and that they're the same class.
Another reason I don't think InternedString is a good name is the fact
WTFString also does copy-on-write of StringIml.
In general, the name of a class or a function should convey:
1. what the class does or how it's implemented
2. what the class is or should be used for
AtomicString does 2 while InternedString does 1. We should try to come up
with a name that does both.
- R. Niwa
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev