On 06/20/2013 11:36 AM, Bobby Holley wrote:> I think we could pretty easily 
promote the typedefs, which will
> get used anyway because they're easier

I think that's debatable.  The typedefs are (negligibly) easier to *type*.  But 
they are not easier to understand.  Extra abstraction layers obfuscate, because 
looking at the implementation of them requires unwrapping through the typedef 
first.  That extra type-chasing hurts, even if you get used to it.

typedefs also may lead people into thinking that those "types" can be 
forward-declared, leading to nasty little surprises when someone tries it.  And 
there's the issue that typedefs hide the underlying type.  If I have 
Rooted<JSString*>, it's clear that trying to seriously use that requires I have 
the definition of JSString.  But if I have RootedString, the implication about 
what definition is needed to meaningfully use it is much less clear.

Jeff
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to