Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2708624.1MEYokBNaJ@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Thu, 30 Aug 2012 15:59:43 +0200 User-Agent: KNode/4.4.11 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+&. <4191624.W6QT1uhmCP@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 46 NNTP-Posting-Date: 30 Aug 2012 15:59:44 CEST NNTP-Posting-Host: 24a6aa43.newsspool3.arcor-online.net X-Trace: DXC=Y4KWN1Q]gd385[]]\]T081McF=Q^Z^V384Fo<]lROoR18kF Thomas 'PointedEars' Lahn wrote: > >>IOW, >> >> do {} while (false) var x = 3; >> >>*is* equivalent to >> >> do {} while (false); var x = 3; >> >>because `var' delimits a /VariableStatement/ and the parser is allowed, in >>order to produce >> > ... >> >>to insert the semicolon before the /VariableStatement/. It's not a bug, >>it's a feature, and a standards-compliant feature at that. > > > This is not true. If you read ECMA 262 section 7.9.1 you will see that > the gap between (false) and var does not match *any* of the > situations where a semicolon can be inserted. The lack of a semicolon is > therefore a syntax error. > > Compilers that 'correct' programming errors are not being helpful. It > can take a long time to track down an obscure bug caused by the compiler > guessing wrong. For crying out loud… | 2 Conformance | | […] | A conforming implementation of ECMAScript is permitted to support program | and regular expression syntax not described in this specification. […] This, if nothing else, is sufficient to make it standards-compliant. PointedEars -- Danny Goodman's books are out of date and teach practices that are positively harmful for cross-browser scripting. -- Richard Cornford, cljs, (2004)