<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Quibbling Over Semicolons</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx</link><description>In a comment to my last entry, a reader said: In C/C++/Java/C# statements must end with a semicolon. JavaScript OTOH allows the use of a newline as a statement separator. Presumably this was done so that it would be easier to use for scripters. Personally,</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Quibbling Over Semicolons</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx#66341</link><pubDate>Mon, 02 Feb 2004 22:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:66341</guid><dc:creator>David Cumps</dc:creator><description>Completely agree&lt;br&gt;don't be lazy :)</description></item><item><title>re: Quibbling Over Semicolons</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx#66346</link><pubDate>Mon, 02 Feb 2004 22:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:66346</guid><dc:creator>Louis Parks</dc:creator><description>What was the reasoning behind allowing devs to not use semis in the first place?</description></item><item><title>re: Quibbling Over Semicolons</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx#66526</link><pubDate>Tue, 03 Feb 2004 06:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:66526</guid><dc:creator>mike</dc:creator><description>Do JScript and JavaScript (ECMAScript, perhaps) differ in this at all?</description></item><item><title>re: Quibbling Over Semicolons</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx#66550</link><pubDate>Tue, 03 Feb 2004 08:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:66550</guid><dc:creator>Eric Lippert</dc:creator><description>The ECMA spec mandates auto semi insertion, and to my knowledge, JScript and JavaScript both implement it consistently and according to the spec.</description></item><item><title>re: Quibbling Over Semicolons</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx#66556</link><pubDate>Tue, 03 Feb 2004 08:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:66556</guid><dc:creator>Dan Shappir</dc:creator><description>Here is another example of an ambiguity stemming from this &amp;quot;feature&amp;quot; (and also from the overloaded meaning of the curly brackets):&lt;br&gt;&lt;br&gt;{ foo: bar() }&lt;br&gt;&lt;br&gt;Is this an anonymous object, with a single member foo equal to the value returned by bar()? Or maybe this is a code block with a labeled call to bar()? How should JScript (or ECMAScript) behave if it encounters a file with just this text?&lt;br&gt;&lt;br&gt;I would have much preferred mandatory semi-colons to such ambiguities. Indeed, I would have been in favor of a mandatory use of var to declare variables (even members). These are two examples where trying to make something simpler ends up making it more complex.&lt;br&gt;&lt;br&gt;Dan (a reader)</description></item><item><title>re: Quibbling Over Semicolons</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx#66770</link><pubDate>Tue, 03 Feb 2004 19:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:66770</guid><dc:creator>Eric Lippert</dc:creator><description>&amp;gt;  How should ECMAScript behave if it encounters a file with just this text? &lt;br&gt;&lt;br&gt;I see what you're getting at, but actually, this has little to do with auto semi insertion.  Basically you're asking should the auto semi inserter do this&lt;br&gt;&lt;br&gt;{ foo : bar() }; // object literal&lt;br&gt;&lt;br&gt;or this&lt;br&gt;&lt;br&gt;{ foo : bar(); } // labeled statement in a block&lt;br&gt;&lt;br&gt;?&lt;br&gt;&lt;br&gt;But in ECMAScript the former isn't even grammatical, so the auto semi inserter will never produce it!  The parser never even considers that it might be an object literal.&lt;br&gt;&lt;br&gt;This is not ambiguous because it is simply not grammatical to have a statement consisting of a single expression that begins with a left curly. See section 12.4 of ECMA 262 Revision 3 for the details.</description></item><item><title>re: When Are You Required To Set Objects To Nothing?</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx#122391</link><pubDate>Thu, 29 Apr 2004 00:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:122391</guid><dc:creator>Fabulous Adventures In Coding</dc:creator><description /></item><item><title>The trouble with dynamic languages</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx#1509645</link><pubDate>Mon, 22 Jan 2007 23:44:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1509645</guid><dc:creator>C# Nuggets</dc:creator><description>&lt;p&gt;Javascript is a dynamic language . And that&amp;amp;#39;s a problem. On the one hand it allows you virtually&lt;/p&gt;
</description></item><item><title>re: Quibbling Over Semicolons</title><link>http://blogs.msdn.com/ericlippert/archive/2004/02/02/quibbling-over-semicolons.aspx#8965529</link><pubDate>Thu, 25 Sep 2008 23:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8965529</guid><dc:creator>Aaron Moore</dc:creator><description>&lt;p&gt;Python seems to get along fine without them.&lt;/p&gt;
</description></item></channel></rss>