On Wed, Apr 2, 2014 at 12:11 AM, Joshua Cranmer 🐧 <pidgeo...@gmail.com>wrote:
> My original design for mozilla::Atomic was meant to avoid what I saw as > the biggest footgun: you cannot misuse mozilla::Atomic in such a way that > you combine atomic and non-atomic accesses on a single variable. You also > cannot mix-and-match different memory orders on the same atomic variable > (in this manner, I willfully departed from std::atomic). Using global > functions instead would tend to cause people to want to draw this > information from the point of declaration to the point of use: note that it > is much easier in tooling to find the declaration of a variable than it is > to find all uses of one. > AFAICT Ehsan is proposing that we continue using atomic types, and his explicit functions would only operate on those atomic types, so his proposal would preserve this aspect of your design. I'm in favor of his proposal. Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o w _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform