Let's kill terms "native" and "host"

Mark S. Miller erights at google.com
Sat Jan 28 20:04:34 PST 2012


On Sat, Jan 28, 2012 at 2:27 PM, John-David Dalton <
john.david.dalton at gmail.com> wrote:

> @MarkM
>
> >Is there something magical about the behavior of this object itself?
>
> For kicks the "magical" bit would be its awesome pre ES6 internal
> [[Class]] value.
>

Sigh. I just tested an you are correct.

    > ({}).toString.call(window.opera)
    [object Opera]

It feels paradoxical but it isn't, quite. Even if there is nothing else
magical about this object, that response is indeed magical enough to
classify it as a host object, thereby requiring some such response. So it
is self consistent. If there is indeed nothing else magical about it, I
would encourage future versions of Opera to provide a native object here
instead, which is identical but for the above response.



> Can we leave "magical" out of a spec convo?
>

It was intended only for humorous emphasis. But even "magical" and "non
magical" would be less confusing than the current terminology!



>
> > Note that just because the object itself is non-standard and provided by
> the
> > host does not make it a host object.
>
> http://es5.github.com/#x4.3.8
> A host object is an "object supplied by the host environment to
> complete the execution environment of ECMAScript."
>

Sigh. This came up last time as well, and as participants in the spec
writing process our only excuse was "That text isn't normative". That
doesn't really excuse it from being so wrong that it leads people into
endless confusion. If ES6 does keep the current terminology, we must at
least fix or remove this confusing text.



>
> Seems like the `opera` object falls into that description. I mean it
> could be a "built-in" if supplied by the ECMAScript environment but
> that's beside the point. I really just want the wiggle room that ES5.x
> provides for [[Class]]/flags/tags/brands.
>
> -JDD
>



-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120128/104b1ca9/attachment-0001.html>


More information about the es-discuss mailing list