Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1946200.aqSPkdTlGX@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sat, 28 Jan 2012 21:17:21 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: Comparing arraies Newsgroups: comp.lang.javascript References: <8dc6b834-cd20-47a5-a085-f4d5e4402c38@c13g2000yqk.googlegroups.com> <4f218d62$0$6578$9b4e6d93@newsspool3.arcor-online.net> <1934880.aqSPkdTlGX@PointedEars.de> <2259221.FRqVoOGUtd@PointedEars.de> <42ZEMLIaWtIPFwSn@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <1634287.nPeGqDzKj4@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 56 NNTP-Posting-Date: 28 Jan 2012 21:17:22 CET NNTP-Posting-Host: 22d34d78.newsspool4.arcor-online.net X-Trace: DXC=YQhe>6[]NbYaAeROF2PWMQ4IUK Thomas 'PointedEars' Lahn wrote: >> John G Harris wrote: >>> Thomas 'PointedEars' Lahn wrote: >>>> Thomas 'PointedEars' Lahn wrote: >>>>> Instead of the `==' operator, the `===' operator may be used as well, >>>>> but it is neither supposed to add efficiency nor would it add >>>>> expressive power (both arguments are of the same type), while it >>>>> certainly reduces the backwards-compatibility of the entire code. >>>> _Operands_, not arguments. We are not talking about a function, but >>>> about an operator. >>> Operators are also functions. How else would + be defined? >> You are confusing functions with algorithms. The subject of discussion >> here is the syntax of the programming language, not the implementation of >> the syntax. > > 1. The syntax specification calls new a keyword and + a punctuator No, the _lexical grammar_ of ECMAScript (Ed. 5.1) says that `new' is a keyword (section 7.6.1.1), and that `+' is a punctuator (section 7.7). The _syntactic grammar_ calls `new' and `+' operators, as in "11.2.2 The `new' Operator" and "11.6.1 The Addition operator (+)". "Productions of the lexical and RegExp grammars are distinguished by having two colons “::” as separating punctuation. […]" (section 5.1.2, last paragraph). > Their operands/arguments are called expressions. Correct for "operands", in the syntactic grammar. Operators do not have arguments; functions (and by extension to OOP, methods) have them. > So we aren't discussing the syntax. Yes, we are. `+' is an operator in the syntax of ECMAScript; it has operands. > 2. In a language where you write add(2,3) what would you call 2 and 3 : > operands or arguments? I get it now: you are trolling again. > All that's special about operators is that they are often invoked using > a non-general format, and they tend to be built into the language. Wrong. PointedEars -- var bugRiddenCrashPronePieceOfJunk = ( navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1 ) // Plone, register_function.js:16