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

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

From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
Date: Tue, 28 Aug 2012 15:00:38 +0400
To: Tab Atkins Jr. <jackalmage@gmail.com>
Cc: (wrong string) “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>
Message-Id: <602891346151638@web15h.yandex.ru>
28.08.2012, 04:33, "Tab Atkins Jr." <jackalmage@gmail.com>:
> On Mon, Aug 27, 2012 at 5:20 PM, Marat Tanalin | tanalin.com
> <mtanalin@yandex.ru> wrote:
>
>> 28.08.2012, 03:27, "Tab Atkins Jr." <jackalmage@gmail.com>:
>>> "Big red switches" like this are an anti-pattern. Occasionally they
>>> can be useful, but they're hazardous and should be avoided if
>>> possible.
>> We already have this "anti-pattern" with DOCTYPE and with X-UA-Compatible. If language cannot be improved without such switches, this is fine pragmatic way to go that is much better than doing nothing.
>
> Yup, DOCTYPE switching was a necessary solution to a very bad compat
> problem. The benefit outweighed the badness. X-UA-Compatible is
> similar (though note that it's not endorsed by any vendors other than
> IE and Chrome Frame, I think, because the pain isn't worth it to
> anyone else).

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.

> You have to justify the big red switch.  I don't think // comments
> come *anywhere* near sufficient benefit to overcome the pain of a
> switch.

If it's not obvious, scope of my proposal is much bigger than just one-line comments (I personally am pretty happy with LESS that supports one-line comments).

The proposal is a _universal_ way to extend CSS without endless wasting of time complaining about backward compatibility.

[1] https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode
Received on Tuesday, 28 August 2012 11:01:10 GMT

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