Let's kill terms "native" and "host"
rossberg at google.com
Mon Jan 30 02:10:04 PST 2012
On 29 January 2012 20:25, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
> Here is a first cut at some improved terminology:
> ECMAScript Object - an object whose primitive semantics are specified by the
> ECMAScript specification
> Foreign Object - an object whose primitive semantics differ from those
> specified by the ECMAScript specification
+1. Instead of "EcmaScript object" you could also say "language object".
> By "primitive semantics" I mean language level semantics defined by the
> ECMAScript specification include the existence and specified behavor of
> "internal properties". It does not mean "application level" semantics such
> as the values of object properties or the actions performed by function
> objects when called.
> Other terms that may be useful:
> Standard Object - An ECMAScript object whose application level semantics are
> defined by the ECMAScript specification
Hm, how would proxies tie in here? According to your definition,
they'd count as standard objects, which I would find rather confusing.
Or do you also want to distinguish "proper objects", maybe?
> Built-in Object - an object that is provided by the ECMAScript
> implementation. A built-in object could be either an ECMAScript Object or a
> Foreign Object
> ECMAScript Function - an ECMAScript Object that has a [[Call]] internal
> Foreign Function - a Foreign Object that has a [[Call]] internal property
> ECMAScript Code Function - an ECMAScript Function whose application level
> semantics are defined using ECMAScript code
> ECMAScript Foreign Code Function - an ECMAScript Function whose application
> level semantics are defined in some manner other than with ECMAScript code
The last two seem a bit obscure, especially since the spec doesn't
really talk about code. Also, for e.g. function proxies, it is not
really clear what code this is referring to (the call trap? the
construct trap? what if the call trap is itself a function proxy whose
call trap is foreign?).
More information about the es-discuss