On Mon, Sep 24, 2012 at 6:44 PM, Brendan Eich <[email protected]> wrote:
>
> The functions that take unrooted parameters and root them should be few and
> in jsapi.cpp, mostly -- right?

Yes.  They're either in jsapi.cpp or they're temporary -- i.e. the
parameter will become a Handle eventually.


> How about we avoid the x0 convention, enable -Wshadow, and see what happens?

I'm partway through doing that.  The main difficulty is how to resolve
clashes between data members and parameters;  the canonical case is in
a constructor:  |X(int x) : x(x) {}|

You can choose to decorate either one to avoid the clash.  If you want
a minimal change, which one you choose depends on the case.  It's
common (but not universal) for the data member to occur more
frequently than the parameter, in which case the minimal change would
be to change the parameter to |xArg|.

But having to make that evaluation over and over is really annoying.
If we decided instead that all data members will eventually be
decorated with '_' (that would be a logical end-point of the recent
trend) then there's no decision to make:  you just rename the data
member.

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

Reply via email to