W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: Explicit feature manifesting for backward-compatibility safety (Was: Comment syntax)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 28 Aug 2012 08:48:11 -0700
Message-ID: <CAAWBYDCP5E0SSDvYkUJT3B3RgbPLq1pZmR_corSvXo2gA65V5g@mail.gmail.com>
To: "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>
Cc: "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>, Zachary “Gamer_Z.” Yaro <zmyaro@gmail.com>, Liam R E Quin <liam@w3.org>, WWW Style <www-style@w3.org>, "Jens O. Meiert" <jens@meiert.com>
On Tue, Aug 28, 2012 at 4:00 AM, Marat Tanalin | tanalin.com
<mtanalin@yandex.ru> wrote:
> I'm not going to argue further; just want to mention another (relatively recent) example (I somehow forgot about it in my previous message) of such switch used in JavaScript (introduced in JavaScript 1.8.5 / ECMAScript 5) [1]:
>
>     "use strict";
>
> It has many of "hazards" you've mentioned as for switches, but it has not prevented this feature to be introduced into language.

It has less hazards, with good reason - they made it so it can be
turned on at a function level, not just globally, and it doesn't
change fundamental parsing.

However, you'll note that they decided *not* to continue with this
tradition for ES6 - ES6 forwent some syntax features as they decided
that being able to silently upgrade without a switch was more
valuable.

~TJ
Received on Tuesday, 28 August 2012 15:49:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT