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

Mark S. Miller erights at google.com
Sat Jan 28 19:51:26 PST 2012


[new subject line]

On Sat, Jan 28, 2012 at 12:03 PM, Dmitry Soshnikov <
dmitry.soshnikov at gmail.com> wrote:
[...]

> Moreover, many "host" objects are implemented in JS itself -- e.g. some
> standard libraries as in Node.js. I called them inefficiently as
> "native-host" objects.
>

I'm not as familiar with Node as I should be, but this surprises me. Can
you give an example?



>
> But from this viewpoint -- is this algorithm step is correct? I.e.
> window.opera being as a native-host can nevertheless have as its
> [[NativeBrand]] values of "Array", "Object", etc?
>
> And a host object then becomes as "an object provided by a host
> environment and has semantic differentiations from this specification".
>

Just because an object is provided as part of the host environment does
*not* make it a host object. Given your statements above, I suspect that
the Node objects you have in mind are all simply native objects provided by
the Node hosting environment. If so, these are *not* host objects.


I think the least confusing way forward may be to drop the terms "host
object" and "native object" completely from ES6. This isn't the first time
that this list has spent many email thread time confusing "host objects"
with "native objects provided by the host". By itself, this would suggest
that the right terminology is "native" and "non-native".

But our "native" term causes even worse confusion! Java taught everyone
that "native" means "not implemented in Java". I have seen many discussions
and IIRC even some documentation that used the term "native" analogously,
to mean "not implemented in JavaScript". This is worse than useless, since
all "non-native"(spec_language) objects are "native"(popular_language)
objects, and all "non-native"(popular_language) objects are
"native"(spec_language) objects. Whenever I am about to use the term
"native" to someone not on the committee or on this list, I usually preface
it with "It means the opposite of what you expect".


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


More information about the es-discuss mailing list