Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!eweka.nl!hq-usenetpeers.eweka.nl!xlned.com!feeder1.xlned.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <3016427.SPkdTlGXAF@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Thu, 20 Oct 2011 23:58:26 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: Objects comparaison ? Newsgroups: comp.lang.javascript References: <1k93ek2.1xghqcy1upjvv5N%unbewusst.sein@fai.invalid> <1783522.fYvYJRLvp5@PointedEars.de> <1411612.7OFYzboFZ6@PointedEars.de> <2326223.jLKWLtnpvF@PointedEars.de> <2065619.34vx2sxqLb@PointedEars.de> <2995463.SPkdTlGXAF@PointedEars.de> <2314707.NYtdq5378b@PointedEars.de> <5478003.ScrLVSd4Jv@PointedEars.de> <6874852.M4kG57y0yY@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 58 NNTP-Posting-Date: 20 Oct 2011 23:58:26 CEST NNTP-Posting-Host: 8e9756d1.newsspool4.arcor-online.net X-Trace: DXC=Z[:RQ4IUK On Tue, 18 Oct 2011 at 19:48:36, in comp.lang.javascript, Thomas > 'PointedEars' Lahn wrote: >> John G Harris wrote: >>> Thomas 'PointedEars' Lahn wrote: >>>> Andreas Bergmaier wrote: >>>>> And what do you mean with "it has parameters"? Attaching a function >>>>> without parameters, or attaching a non-function property would be OK? >>>> He is confusing this with Object.prototype.equals(obj1, obj2), >>> It's not me that's confused. You attached the function to Object, a >>> constructor. That is what I was commenting on. >> In order to save yourself from further embarassment, you really want to >> have at least a look at the ECMAScript Language Specification, Edition 5 >> Final, before further commenting on the programming that is on-topic >> here. > > You really do need to learn to provide a reasoned explanation instead of > abusive hot air. You appear to have a serious reading problem. >>>> which would be a rather bad idea indeed, for two reasons: >>>> >>>> First, it would show up in for-in iteration as it would be enumerable >>>> (and it remains to be seen how widely Object.defineProperty() is >>>> implemented, so that this can be prevented). >>>> >>>> Second, the conflict between the `this' value and one of the arguments >>>> needs to be resolved: Which value refers to the object being compared >>>> against? >>> >>> >>> There is no conflict. Which values are to be compared is resolved by the >>> function's specification. You do have one, don't you? From the displayed >>> code it appears to be obj1 and obj2; the this value is not used. >> >> I was talking about the other way to implement this, >> Object.prototype.equals(), in that paragraph, as can be seen further >> above. Assuming it would be implemented that way, >> >> Object.prototype.equals = function(obj1, obj2) { >> … >> }; > > > What a bloody awful thing to do. You definitely have a serious reading problem, and one with quoting, too. Go away. 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,