From: kangax on
On 1/4/10 12:02 AM, Thomas 'PointedEars' Lahn wrote:
> Garrett Smith wrote:
>
>> Thomas 'PointedEars' Lahn wrote:
>>> Garrett Smith wrote:
>>>> Ryan Chan wrote:
>>>>> Have read Douglas Crockfore's JavaScript The Good Parts, it recommend
>>>>> Augmenting Types, e.g.
>>>>>
>>>>> Function.prototype.method = function(name, func) {
>>>>> this.prototype[name] = func;
>>>>> return this;
>>>>> };
>>>>>
>>>> This is not a good thing.
>>>> The `method` method is not related to all Functions; only constructors.
>>> Non sequitur. All Function instances may be used as constructor.
>>
>> No, none of the built in functions may be used as a constructor.
>
> That is obviously wrong. RTFM.

Wrong? Hardly. Incomplete, yes.

A more correct rephrasing would probably be:

None of the built-in functions may be used as a constructor, as none of
them shall implement internal [[Construct]] method (unless specified
explicitly in a corresponding section of specification).

[...]

--
kangax
From: David Mark on
On Jan 4, 12:43 am, kangax <kan...(a)gmail.com> wrote:
> On 1/3/10 8:43 PM, David Mark wrote:
>
>
>
> > On Jan 3, 8:34 pm, David Mark<dmark.cins...(a)gmail.com>  wrote:
> >> On Jan 3, 8:17 pm, Jorge<jo...(a)jorgechamorro.com>  wrote:
>
> >>> On Jan 4, 1:45 am, David Mark<dmark.cins...(a)gmail.com>  wrote:
>
> >>>> LOL.  So you should just screw all IE users and figure they will be
> >>>> grateful for the tough love?  Are you insane?
>
> >>> Don't know where you've been lately, but the days when you had to use
> >>> IE, yes or yes, are gone.
>
> >> Huh?  I don't know where _you_ have been lately, but many large
> >> corporations have endless seas of cubes stocked with IE users.  Some
> >> even have ActiveX and/or JS disabled _for them_ when using the public
> >> Internet.  Try that combo (both off) and notice that 90% of the Web
> >> falls apart (100% of jQuery-enhanced sites).
>
> > Correction.  I meant to say that 100% of jQuery-enhanced sites will
> > fail with ActiveX off (at least if they try to use Ajax).  With both
> > off, perhaps 50% (just a guess).  That is the only sort of
> > "progressive" enhancement that jQuery and the like allow for (on or
> > off).
>
> They won't _just fail_.
>
> Last time I checked IE would actually propose to disable scripts as soon
> as "automation server can't create object ..." error (the one that's
> thrown when initializing ActiveXObject with disabled ActiveX controls)
> happened.

Propose? I've never seen it do anything but throw that obscure error
message at the user. What version/configuration are you talking
about?

And assume if it did. Put yourself in the end-user's chair. You see
a dialog asking if you want to disable scripts on this page. The back
button is the next move for most.

>
> User can choose to disable scripts and proceed with a fully functional
> page/app (that is, if things work without scripting,

And that's a big if, of course. Most users will panic and flee
anyway.

> of course :)). I
> don't know if this popup appears in IE consistently. There's probably
> also a chance of popup being disabled (e.g. by administrator); or user
> not understanding what popup message means and choosing to leave script
> running, ending up with defunct application.

Yep. There's no right answer for the user. Most will have no clue
which to choose anyway.

>
> But obviously there's really no reason to let errors like this happen. I
> think the problem is that not many developers are aware of a possibility
> for ActiveX to be disabled, and what to do about all this.
>

And that's very odd as it has been over a decade since IE6 came out
(and these issues were present IE < 6 as well). Why should such
developers endeavor to shield neophytes from the rigors of cross-
browser scripting (translates to dealing with IE for most
applications) when they can't figure out IE. They had a decade of
relative calm on that front and then... ;)
From: Thomas 'PointedEars' Lahn on
kangax wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Garrett Smith wrote:
>>> Thomas 'PointedEars' Lahn wrote:
>>>> Garrett Smith wrote:
>>>>> Ryan Chan wrote:
>>>>>> Function.prototype.method = function(name, func) {
>>>>>> this.prototype[name] = func;
>>>>>> return this;
>>>>>> };
>>>>>>
>>>>> This is not a good thing.
>>>>> The `method` method is not related to all Functions; only
>>>>> constructors.
>>>> Non sequitur. All Function instances may be used as constructor.
>>>
>>> No, none of the built in functions may be used as a constructor.
>>
>> That is obviously wrong. RTFM.
>
> Wrong? Hardly. Incomplete, yes.
>
> A more correct rephrasing would probably be:
>
> None of the built-in functions may be used as a constructor, as none of
> them shall implement internal [[Construct]] method (unless specified
> explicitly in a corresponding section of specification).

How can something be "more correct" (there is no comparison of "correct")
when it is still obviously wrong?


PointedEars
--
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: kangax on
On 1/4/10 1:18 AM, Thomas 'PointedEars' Lahn wrote:
> kangax wrote:
>
>> Thomas 'PointedEars' Lahn wrote:
>>> Garrett Smith wrote:
>>>> Thomas 'PointedEars' Lahn wrote:
>>>>> Garrett Smith wrote:
>>>>>> Ryan Chan wrote:
>>>>>>> Function.prototype.method = function(name, func) {
>>>>>>> this.prototype[name] = func;
>>>>>>> return this;
>>>>>>> };
>>>>>>>
>>>>>> This is not a good thing.
>>>>>> The `method` method is not related to all Functions; only
>>>>>> constructors.
>>>>> Non sequitur. All Function instances may be used as constructor.
>>>>
>>>> No, none of the built in functions may be used as a constructor.
>>>
>>> That is obviously wrong. RTFM.
>>
>> Wrong? Hardly. Incomplete, yes.
>>
>> A more correct rephrasing would probably be:
>>
>> None of the built-in functions may be used as a constructor, as none of
>> them shall implement internal [[Construct]] method (unless specified
>> explicitly in a corresponding section of specification).
>
> How can something be "more correct" (there is no comparison of "correct")
> when it is still obviously wrong?

You can't be serious... I'm sure you can find relevant section in specs
on your own.

--
kangax
From: kangax on
On 1/4/10 1:15 AM, David Mark wrote:
> On Jan 4, 12:43 am, kangax<kan...(a)gmail.com> wrote:
>> On 1/3/10 8:43 PM, David Mark wrote:
>>
>>
>>
>>> On Jan 3, 8:34 pm, David Mark<dmark.cins...(a)gmail.com> wrote:
>>>> On Jan 3, 8:17 pm, Jorge<jo...(a)jorgechamorro.com> wrote:
>>
>>>>> On Jan 4, 1:45 am, David Mark<dmark.cins...(a)gmail.com> wrote:
>>
>>>>>> LOL. So you should just screw all IE users and figure they will be
>>>>>> grateful for the tough love? Are you insane?
>>
>>>>> Don't know where you've been lately, but the days when you had to use
>>>>> IE, yes or yes, are gone.
>>
>>>> Huh? I don't know where _you_ have been lately, but many large
>>>> corporations have endless seas of cubes stocked with IE users. Some
>>>> even have ActiveX and/or JS disabled _for them_ when using the public
>>>> Internet. Try that combo (both off) and notice that 90% of the Web
>>>> falls apart (100% of jQuery-enhanced sites).
>>
>>> Correction. I meant to say that 100% of jQuery-enhanced sites will
>>> fail with ActiveX off (at least if they try to use Ajax). With both
>>> off, perhaps 50% (just a guess). That is the only sort of
>>> "progressive" enhancement that jQuery and the like allow for (on or
>>> off).
>>
>> They won't _just fail_.
>>
>> Last time I checked IE would actually propose to disable scripts as soon
>> as "automation server can't create object ..." error (the one that's
>> thrown when initializing ActiveXObject with disabled ActiveX controls)
>> happened.
>
> Propose? I've never seen it do anything but throw that obscure error
> message at the user. What version/configuration are you talking
> about?

IE7 shows error popup and asks if I want to continue running scripts on
this page.

Something like this �
<http://chadsanswers.com/wp-content/uploads/2009/04/toaster.jpg>, but
different error of course.

[...]

>> But obviously there's really no reason to let errors like this happen. I
>> think the problem is that not many developers are aware of a possibility
>> for ActiveX to be disabled, and what to do about all this.
>>
>
> And that's very odd as it has been over a decade since IE6 came out
> (and these issues were present IE< 6 as well). Why should such
> developers endeavor to shield neophytes from the rigors of cross-
> browser scripting (translates to dealing with IE for most
> applications) when they can't figure out IE. They had a decade of
> relative calm on that front and then... ;)

I've been meaning to write about it for some time now. Will do whenever
I get a chance. Perhaps someone will listen.

--
kangax