FAQ Topic - What is a native object? (2010-08-02)

F

FAQ server

-----------------------------------------------------------------------
FAQ Topic - What is a native object?
-----------------------------------------------------------------------

A native object is any object whose semantics are fully defined by
ECMA-262.

Some native objects are built-in; others, such as user-defined objects,
may be constructed during the execution of an ECMAScript program.

Example:

// Native built-in objects:
var m = Math, // Built-in Math object.
slice = Array.prototype.slice, // Built-in native method.
o = {}, // Native user-defined object.
f = function(){}, // Native user-defined function.
d = new Date(),
a = [],
e = new Error("My Message.");

See also:

<URL: http://dmitrysoshnikov.com/ecmascript/chapter-7-2-oop-ecmascript-implementation/>


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/
 
R

Ry Nohryb

-----------------------------------------------------------------------
FAQ Topic - What is a native object?
-----------------------------------------------------------------------

A native object is any object whose semantics are fully defined by
ECMA-262.

Some native objects are built-in; others, such as user-defined objects,
may be constructed during the execution of an ECMAScript program.
(...)

And some native objects are provided by the host environment.
 
A

Asen Bozhilov

Ry said:
:

And some native objects are provided by the host environment.

What do you mean? Host environment provides only host objects. Host
objects can be implemented as native ECMAScript objects, but your
objections are for entry about host objects. If the maintainer of FAQ
include your objections here, the readers would be confused what
exactly is host object and what is native object.
 
D

David Mark

What do you mean?

Near as I can tell, Jorge posts confusing nonsense in hopes of getting
attention.
Host environment provides only host objects. Host
objects can be implemented as native ECMAScript objects, but your
objections are for entry about host objects. If the maintainer of FAQ
include your objections here, the readers would be confused what
exactly is host object and what is native object.

Just ignore him. Maybe he'll go away.
 
R

Ry Nohryb

What do you mean? Host environment provides only host objects. Host
objects can be implemented as native ECMAScript objects, but your
objections are for entry about host objects. If the maintainer of FAQ
include your objections here, the readers would be confused what
exactly is host object and what is native object.

A host object is an object supplied by the host environment. A native
object is an object that fully implements the object semantics defined
by the Ecma-262 specification. A host object can be at the same time a
native object: there are native host objects and non-native host
objects.

:)
 
D

David Mark

A host object is an object supplied by the host environment. A native
object is an object that fully implements the object semantics defined
by the Ecma-262 specification. A host object can be at the same time a
native object: there are native host objects and non-native host
objects.

You are simply creating a muddle. Most JS developers haven't yet
grasped the difference between host and native objects and you suggest
this as a useful addition to the FAQ (which is clearly aimed at
beginners).
 
R

Ry Nohryb

You are simply creating a muddle.  Most JS developers haven't yet
grasped the difference between host and native objects and you suggest
this as a useful addition to the FAQ (which is clearly aimed at
beginners).

What does this have to do with your previous post:

"Near as I can tell, Jorge posts confusing nonsense in hopes of
getting
attention. (...) Just ignore him. Maybe he'll go away."

?
 
R

Ry Nohryb

(...) If the maintainer of FAQ
include your objections here, the readers would be confused what
exactly is host object and what is native object.

It seems that even the ECMA's ES spec is confusing wrt this.
 
A

Asen Bozhilov

Ry said:
Asen Bozhilov wrote:

A host object is an object supplied by the host environment. A native
object is an object that fully implements the object semantics defined
by the Ecma-262 specification. A host object can be at the same time a
native object: there are native host objects and non-native host
objects.

This is exactly what I said. As I said if he includes these objections
the readers would be confused. Your suggestions are not for this
entry. This should be part of entry about "What is a host object?".
Just should be maximum clear for readers, because this topic is one of
the most confusing JS developers.
 
R

Ry Nohryb

This is exactly what I said.

This is exactly what I said firstly, and you just repeated.
As I said if he includes these objections

Objections ? Which objections ? Addition, you mean ?
the readers would be confused.

Why ? Does it confuse you ? If not, why would it confuse somebody
else ?
Your suggestions are not for this
entry. This should be part of entry about "What is a host object?".

Yes, too.
Just should be maximum clear for readers, because this topic is one of
the most confusing JS developers.

Then this FAQ entry should *not* suggest -wrongly, as it does- that
the set of native objects is made of [ the set (ES) built-ins + the
set of user defined ones ], because if host objects can be implemented
as native they ought to be included in that set too.
 
A

Asen Bozhilov

Ry said:
Asen Bozhilov wrote:

This is exactly what I said firstly, and you just repeated.

What you wrote:
"And some native objects are provided by the host environment."

Which is wrong sentence. The host environment provides only host
objects. They can be implemented as native objects but this fact does
not mean they are not host objects.
Your objections/additions are not for this entry. They are for entry
about host objects.

Then this FAQ entry should *not* suggest -wrongly, as it does- that
the set of native objects is made of [ the set (ES) built-ins + the
set of user defined ones ], because if host objects can be implemented
as native they ought to be included in that set too.

The description of native objects must not contains any information
about host objects. Ask wherever you want about the differences
between host and native objects and read the answers. There are too
many confused people from this topic and cljs FAQ has the best
explanation.
 
R

Ry Nohryb

This is exactly what I said firstly, and you just repeated.
What you wrote:

  "And some native objects are provided by the host environment."

Which is wrong sentence. The host environment provides only host
objects. They can be implemented as native objects but this fact does
not mean they are not host objects.
Your objections/additions are not for this entry. They are for entry
about host objects.
Then this FAQ entry should *not* suggest -wrongly, as it does- that
the set of native objects is made of [ the set (ES) built-ins + the
set of user defined ones ], because if host objects can be implemented
as native they ought to be included in that set too.

The description of native objects must not contains any information
about host objects. Ask wherever you want about the differences
between host and native objects and read the answers. There are too
many confused people from this topic and cljs FAQ has the best
explanation.

Jesus. Have a coffee. What a mess you're making of this. There's a
third kind (*) of native objects not listed here: the native host
objects. That's it. And that's all.

(*)
1.- ES built-ins.
2.- user-defined.
3.- native host objects.

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top