Path: csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <8995129.ntDRjfdyY2@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Tue, 25 Feb 2014 04:17:45 +0100 User-Agent: KNode/4.11.5 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <0.914eafe42061d70d7566.20140224044930GMT.87fvn9ru79.fsf@bsb.me.uk> <4293011.KJL4Tygh8x@PointedEars.de> <0.60537d4b87ccab3ac30a.20140224212551GMT.87ppmcqk2o.fsf@bsb.me.uk> <6171065.55Kx8BzDJ9@PointedEars.de> <0.cdb16769a0583ce3f5e4.20140225030840GMT.87k3cjrirr.fsf@bsb.me.uk> MIME-Version: 1.0 Lines: 63 NNTP-Posting-Date: 25 Feb 2014 04:17:47 CET NNTP-Posting-Host: 3c2aece7.newsspool1.arcor-online.net X-Trace: DXC=J:[fHiBDe2keoCI^f\Y]Eaic==]BZ:afn4Fo<]lROoRankgeX?EC@@`59mb1gI=;^iDZm8W4\YJNlYUVHKH;GI^g>8ZdD_1a;VhHGLPNdQ6B_` X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.php:12948 Ben Bacarisse wrote: > Thomas 'PointedEars' Lahn writes: >> Ben Bacarisse wrote: >>> Thomas 'PointedEars' Lahn writes: >>>> Ben Bacarisse wrote: >>>>> […] Expressions are built from operators, but is ',' an operator in >>>>> [PHP? >>>>> It appears in the operator precedence table but it isn't an operator >>>>> in an sense that would normally be understood by someone familiar with >>>>> these terms. >>>> >>>> ECMAScript has a “Comma Operator”, too. >>> >>> But my point was the PHP doesn't have one -- >> >> But it does: >> >> for ($i = 0, $j = 42; $i < $j; ++$i); > > But try this: > > for (($i = 0, $j = 42); $i < $j; ++$i); Bogus example. > In general, putting an expression in parentheses does not stop it being > an expression. > > The permission to use ',' in a for statement is special > syntax: it's not part of the syntax for an expression. To give another > example, if the ',' in a for statement built an expression you should be > able to change: > > for ($i = 0; f($1), $i < 10; $i++) { ...; } > > into > > $i = 0; > while (f($1), $i < 10) { ...; $i++; } > > but you can't, because while takes an expression as the condition, and > f($i), $i < 10 is not an expression! Irrelevant. >>> not in any normal sense of the word. >> >> Please define what you consider to be an operator in a “normal sense of >> the word”. > > It's a syntactic symbol that can be used to combine simpler expressions > in such a way that the result is also, syntactically, an expression. A very narrow definition of “operator”. PointedEars -- Sometimes, what you learn is wrong. If those wrong ideas are close to the root of the knowledge tree you build on a particular subject, pruning the bad branches can sometimes cause the whole tree to collapse. -- Mike Duffy in cljs,