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

Re: [css-variables] Using $foo as the syntax for variables

From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
Date: Fri, 25 May 2012 21:36:05 +0400
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-Id: <934881337967365@web28h.yandex.ru>
Anything in this world has its own drawbacks as well as advantages or even killer features (and using $ token for vars is _not_ one of drawbacks of PHP; at the contrary, it's a very useful advantage of PHP).

For example, non-XML-like syntax of CSS can be treated as a big mistake that made it hard to extend the CSS language itself. With XML-like syntax, we could have totally unambiguous syntax-construct bounds, e.g.:

            Some new selector that old browsers cannot parse but that does not cause
            any problems in parsing entire stylesheet. So, unlike current CSS, we are't
            limited by need to make structure of new selectors "forward-compatible".
..and therefore do not care about that older parsers would not be able to determine where selector is ended and declarations are started since, unlike current CSS syntax, we have unambiguous selector bounds here.

But we have what we have, and it's OK. Having drawbacks does not derogate advantages (for example, an advantage of current CSS syntax over XML-like one is relative brevity of the former).

25.05.2012, 20:25, "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>:
> Le 25/05/12 16:53, Marat Tanalin | tanalin.com a écrit :
>>  'Many' is an unconstructive abstraction. PHP is the most popular web-programming language while it uses "$" for vars, and it wasn't an obstacle for PHP to become that popular.
> I also read recently that PHP is the most incoherent and sometimes
> unreadable language ever, grown in circles from multiple syntactic
> sources and having multiple solutions for features. Hum, to say the
> least.
> </Daniel>
Received on Friday, 25 May 2012 17:37:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:16 UTC