Michael McGlothlin wrote:
I'd rather that prop just match the object the method is actually attached to, regardless of the context of 'this', before continuing searching the tree. Familiar as its done that way in many languages,
You mean static (applied to types, including fields in objects) languages? Those are not like JS in the critical sense that a free variable reference in a JS method, e.g.

class C {
  m() { return x; }
  ...
}

should resolve per lexical scope, not per an implicit `this.` that may or may not apply, depending on whether 'x' in this => true.

If you say it always means `this.x` then there's no way to refer to an outer lexical variable, x.

So there has to be some prefix, if not `this.`, to distinguish.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to