[webkit-dev] When should I use AtomicString vs String?
rniwa at webkit.org
Sat Jun 1 17:01:24 PDT 2013
On Sat, Jun 1, 2013 at 4:45 PM, Maciej Stachowiak <mjs at apple.com> wrote:
> On Jun 1, 2013, at 3:58 PM, Darin Adler <darin at apple.com> wrote:
> On May 31, 2013, at 8:01 PM, Glenn Adams <glenn at skynav.com> wrote:
> One thing that always threw me was the term "Atomic" in the class name. I
> wonder if the term "InternedString" would make it usage more apparent.
> I personally love the name AtomicString (the string of tomorrow) and have
> been using that name for it for the past 10 years, but I see that
> InternedString is what this would be called in Java and .NET context so I
> guess we could change to help people familiar with those.
> If we were to change the name, I'd go with Symbol or Atom. But I think
> AtomicString is a fine name and I don't think InternedString is better. All
> plausible names I can think of are jargon that you have to learn the first
> time if you don't know it.
I don't like "InternedString" either. In general, we should avoid using
design pattern jargons like interning, mediator, flyweight, etc... when we
can come up with a more descriptive name.
- R. Niwa
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev