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

Discussion in 'Javascript' started by FAQ server, Aug 2, 2010.

  1. FAQ server

    FAQ server Guest

    -----------------------------------------------------------------------
    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/

    --

    The sendings of these daily posts are proficiently hosted
    by http://www.pair.com.
    FAQ server, Aug 2, 2010
    #1
    1. Advertising

  2. FAQ server

    Ry Nohryb Guest

    On Aug 2, 1:00 am, "FAQ server" <> wrote:
    > -----------------------------------------------------------------------
    > 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.
    --
    Jorge.
    Ry Nohryb, Aug 2, 2010
    #2
    1. Advertising

  3. Ry Nohryb wrote:
    > "FAQ server" wrote:


    > > 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.


    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.
    Asen Bozhilov, Aug 2, 2010
    #3
  4. FAQ server

    David Mark Guest

    On Aug 2, 5:28 am, Asen Bozhilov <> wrote:
    > Ry Nohryb wrote:
    > > "FAQ server" wrote:
    > > > 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.

    >
    > 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.
    David Mark, Aug 2, 2010
    #4
  5. FAQ server

    Ry Nohryb Guest

    On Aug 2, 11:28 am, Asen Bozhilov <> wrote:
    > Ry Nohryb wrote:
    > > "FAQ server" wrote:
    > > > 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.

    >
    > 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.

    :)
    --
    Jorge.
    Ry Nohryb, Aug 2, 2010
    #5
  6. FAQ server

    David Mark Guest

    On Aug 2, 11:32 am, Ry Nohryb <> wrote:
    > On Aug 2, 11:28 am, Asen Bozhilov <> wrote:
    >
    > > Ry Nohryb wrote:
    > > > "FAQ server" wrote:
    > > > > 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.

    >
    > > 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.
    >


    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).
    David Mark, Aug 2, 2010
    #6
  7. FAQ server

    Ry Nohryb Guest

    On Aug 2, 5:38 pm, David Mark <> wrote:
    > On Aug 2, 11:32 am, Ry Nohryb <> 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.

    >
    > 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."

    ?
    --
    Jorge.
    Ry Nohryb, Aug 2, 2010
    #7
  8. FAQ server

    Ry Nohryb Guest

    On Aug 2, 11:28 am, Asen Bozhilov <> wrote:
    > (...) 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.
    --
    Jorge.
    Ry Nohryb, Aug 2, 2010
    #8
  9. Ry Nohryb wrote:
    > Asen Bozhilov wrote:


    > > 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.


    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.
    Asen Bozhilov, Aug 2, 2010
    #9
  10. FAQ server

    Ry Nohryb Guest

    On Aug 2, 9:27 pm, Asen Bozhilov <> wrote:
    > Ry Nohryb 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.


    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.
    --
    Jorge.
    Ry Nohryb, Aug 3, 2010
    #10
  11. Ry Nohryb wrote:
    > Asen Bozhilov wrote:


    > > This is exactly what I said.

    >
    > 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.
    Asen Bozhilov, Aug 3, 2010
    #11
  12. FAQ server

    Ry Nohryb Guest

    On Aug 3, 12:36 pm, Asen Bozhilov <> wrote:
    > Ry Nohryb wrote:
    > > Asen Bozhilov wrote:
    > > > This is exactly what I said.

    >
    > > 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,
    --
    Jorge.
    Ry Nohryb, Aug 3, 2010
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Saraswati lakki
    Replies:
    0
    Views:
    1,277
    Saraswati lakki
    Jan 6, 2012
  2. FAQ server
    Replies:
    0
    Views:
    67
    FAQ server
    Jan 23, 2010
  3. FAQ server
    Replies:
    9
    Views:
    109
    Garrett Smith
    Apr 20, 2010
  4. FAQ server
    Replies:
    6
    Views:
    96
    Thomas 'PointedEars' Lahn
    Jun 2, 2010
  5. FAQ server
    Replies:
    10
    Views:
    354
    Dr J R Stockton
    Aug 5, 2010
Loading...

Share This Page