From: Thomas 'PointedEars' Lahn on
Garrett Smith wrote:

> Thomas 'PointedEars' Lahn wrote:
>> kangax wrote:
>>> Thomas 'PointedEars' Lahn wrote:
>>>> kangax wrote:
>>>> There is *nothing* in the Specification that says that Function
>>>> instances are not [[Construct]]able by default. In fact, function
>>>> instances/objects do have by default an internal [[Construct]]
>>>> property. (13.2)
>>> Aren't we talking about built-in functions? What do Function instances
>>> have to do with this?
>>
>> If you had cared to read the definitions I quoted ...
>>
>>>> However, in any case the statement "None of the built in functions may
>>>> be used as a constructor." is not only incomplete; it is obviously
>>>> _wrong_. As the statement is an existential negation, to prove it
>>>> wrong I need only one counter-example:
>>>>
>>>> var o = new Object();
>>> How is this a proof?
>>
>> `Object' is a built-in function.
>
> What do you think the Object Constructor is?

See above. The ECMAScript Language Specification (Editions 3 and 5,
section 15, in particular 15.2) and `typeof' (implementations, per ES3+5,
11.4.3) agree.¹

> Why do you think the specification calls it "The Object Constructor"?

Let's see -- why would I think that something called "Constructor" is
called so -- maybe because it can be "used in a `new' expression" (ES3+5,
4.2.1) to "create and initialize an object" (ES3+5, 4.3.4, 15.2.2)?

You still appear to miss the point: Your statement is wrong because it
is too general.

Or you need to ask smarter questions.


HTH

PointedEars
___________
¹ Would you like the next release of the ECMAScript Support Matrix
(<http://PointedEars.de/es-matrix>) to show the numbers of the
sections a particular language feature is specified by, in the
"ECMAScript" column, for faster reference? (Suggestions welcome.)
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(a)news.demon.co.uk>
From: Eric Bednarz on
kangax <kangax(a)gmail.com> writes:

> IIRC, IE introduced `hasOwnProperty` starting with 5.5,

Are you talking about IE or JScript?

> so 5.0 and
> lower don't have it.

Probably IE, because there is also no hasOwnProperty in JScript 5.1.
If *IE* 5.0 has it or not is uncertain until you test it. My IE 5.0 on
Windows 2000 certainly has it because I run system updates and the
JScript version is 5.6.
From: kangax on
On 1/6/10 6:28 AM, Eric Bednarz wrote:
> kangax<kangax(a)gmail.com> writes:
>
>> IIRC, IE introduced `hasOwnProperty` starting with 5.5,
>
> Are you talking about IE or JScript?

IE.

>
>> so 5.0 and
>> lower don't have it.
>
> Probably IE, because there is also no hasOwnProperty in JScript 5.1.
> If *IE* 5.0 has it or not is uncertain until you test it. My IE 5.0 on
> Windows 2000 certainly has it because I run system updates and the
> JScript version is 5.6.

Ok. I have a default installation of 5.01 (no updates, AFAIC) and
there's no `hasOwnProperty` there.

IE 5.2 on my mac is missing it too.

--
kangax
From: Jorge on
On Jan 6, 5:29 pm, kangax <kan...(a)gmail.com> wrote:
>
> Ok. I have a default installation of 5.01 (no updates, AFAIC) and
> there's no `hasOwnProperty` there.
>
> IE 5.2 on my mac is missing it too.

And 5.2.3 as well.
--
Jorge.
From: kangax on
On 1/7/10 10:46 PM, Jorge wrote:
> On Jan 6, 5:29 pm, kangax<kan...(a)gmail.com> wrote:
>>
>> Ok. I have a default installation of 5.01 (no updates, AFAIC) and
>> there's no `hasOwnProperty` there.
>>
>> IE 5.2 on my mac is missing it too.
>
> And 5.2.3 as well.

Well, that's the one I have. 5.2.3 (5815.1)

Surprisingly, it seems to be working on Snow Leopard just fine.

--
kangax