[webkit-dev] When should I use AtomicString vs String?

Maciej Stachowiak mjs at apple.com
Sun Jun 2 23:18:01 PDT 2013


On Jun 2, 2013, at 3:49 AM, Glenn Adams <glenn at skynav.com> wrote:

> 
> On Sun, Jun 2, 2013 at 2:48 AM, Maciej Stachowiak <mjs 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.
> 
> Ummmmm, why do you think I suggested "Symbol"? 
> 
> On Jun 1, 2013, at 9:09 PM, Glenn Adams <glenn at skynav.com> wrote:
>> Seriously, if "Atomic" isn't jargon, Intern isn't either.
> 
> Both are jargon. "Atom" and "Intern" in various forms are both used elsewhere so will be relevant to people from some other technical communities. Neither is completely obvious to the novice.
> 
> 
> Overall, I don't think any of the names suggested on this thread are sufficiently better to be worth the transition cost (including my own suggestions of Symbol and Atom).
> 
> Perhaps just adding a brief comment at the head of AtomicString.h to the effect:
> 
> "This class might have been named SymbolString, AtomString, or InternedString, but we're sticking with AtomicString for historical reasons, and since the former are not markedly superior to the latter. Further, the term Atomic is not intended to be read as meaning 'atomic' in the sense of synchronic."

Explaining the purpose and nature of the class in a comment would be fine. But discussing the alternate names not chosen, or what the name doesn't mean -- that doesn't seem like good comment material. Too meta.

 - Maciej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130602/1d5769e8/attachment.html>


More information about the webkit-dev mailing list