From: Andrea Giammarchi on
On Mar 19, 1:28 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
wrote:
> And it is less compatible.

tell me which browser exactly gives you problem with instanceof ...
and if you ends up with IE4 I do believe you have no features
detections for those cases where try catch are essential ... so I hope
you don't consider your library more robust and I have already wrote
an alternative based on the true inheritance ...
From: Thomas 'PointedEars' Lahn on
Andrea Giammarchi wrote:

[Context restored]
> Thomas 'PointedEars' Lahn wrote:
>> > If we want rely on constructors and their prototype, why create such
>> > method rather than do this check?
>> >
>> > if (o instanceof Map) {
>> >
>> > }
>> >
>> > it's even shorter than
>> >
>> > if (Map.isInstance(o)) {
>> >
>> > }
>> And it is less compatible.
>
> tell me which browser exactly gives you problem with instanceof ...

Those using implementations based on ECMAScript < 3, JavaScript < 1.5,
or JScript < 5.0. Yes, that includes IE 4.x.

> and if you ends up with IE4 I do believe you have no features
> detections for those cases where try catch are essential ...

try..catch can be wrapped so that a less capable compiler does not find it
(so no SyntaxError there).

> so I hope you don't consider your library more robust

Yes, I do.

> and I have already wrote an alternative based on the true inheritance ...

Inheritance is beside the point here, and your alternative suggestion is
not even compatible to non-Geckos. Talk about robust libraries.

BTW, trimming quotes means to leave the relevant parts.


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
From: Asen Bozhilov on
Thomas 'PointedEars' Lahn wrote:

> That a Map instance can be recognized for what it is.  This is important
> because there are some methods that are only available to Map instances.  
> RTSL.

It's a flawed argument. If you need to do it something, only with Map
instances. These methods should be with `private` signatures. There
no need dummy method like that for observing `private` properties.

"RTSL" - Don't use repeatedly abbreviations. They are with different
meaning, depend by context. And i don't need to know each abbreviation
to understand your post. In that context, "RTSL" mean "Read The
Source, Luke".
First of all, my name isn't Luke. So that abbreviation is nonsense at
all. Second, there aren't any links to your source code. Third, i was
read your code using google.

If you want better meaning of RTSL:

Rewrite The Source, Lahn.
From: Asen Bozhilov on
Thomas 'PointedEars' Lahn wrote:
> Andrea Giammarchi wrote:

> > and I have already wrote an alternative based on the true inheritance ....
>
> Inheritance is beside the point here, and your alternative suggestion is
> not even compatible to non-Geckos.  Talk about robust libraries.

Are you read his code? It's compatible with any ECMA-262
implementations, because `__proto__` is valid Identifier. Of course
Identifiers name like that aren't good practice. But before you blame
someone, please read precisely him code. Thanks.
From: Thomas 'PointedEars' Lahn on
Asen Bozhilov wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Andrea Giammarchi wrote:
>> > and I have already wrote an alternative based on the true inheritance
>> > ...
>>
>> Inheritance is beside the point here, and your alternative suggestion is
>> not even compatible to non-Geckos. Talk about robust libraries.
>
> Are you read his code? It's compatible with any ECMA-262
> implementations, because `__proto__` is valid Identifier. Of course
> Identifiers name like that aren't good practice. But before you blame
> someone, please read precisely him code. Thanks.

(You are still writing a lot of gibberish.)

Yes, he got me confused (intentionally?) with the __proto__ argument.
However, it is safe to say that while his code is compatible to some non-
Geckos, it is not as compatible as mine, and it certainly is not equivalent
to mine (which was the point of the exercise).

FYI, in the process I have updated the (hopefully-soon-to-be) next release
of the ECMAScript Support Matrix¹ as follows:

ECMAScript JavaScript JScript V8 JSC Opera KJS
[1] 5 [15.2.4.6] 1.5 5.5.6330 2.0 525.13 5.02 4.3.4
___
[1] Object.prototype.isPrototypeOf(Object) : boolean


PointedEars
___________
¹ <http://PointedEars.de/es-matrix>
--
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>
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Prev: how to get url of script
Next: question of logic?