W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css-variables] Last call comments

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 11 Feb 2013 13:38:51 -0800
Message-ID: <CAAWBYDDhpULwZ_x1B=t5FSeOGWtx2FgYh=v9JZvk-97HFX5i9Q@mail.gmail.com>
To: Fran├žois REMY <francois.remy.dev@outlook.com>
Cc: Brian Kardell <bkardell@gmail.com>, "www-style@w3.org" <www-style@w3.org>
On Mon, Feb 11, 2013 at 1:06 PM, Fran├žois REMY
<francois.remy.dev@outlook.com> wrote:
>> The only thing called "variables" is the var() syntax, which is used
>> like a variable in any other language, with its value substituted in
>> its place.
> Not at all. The var() notation is a *reference* or a *data binding* to a custom property, in no case a "variable". In the programming language world, a variable is a box referencable statically via a memory address relative to the stack. When you reference something dynamically this is not a variable, this is a property, because it's relative to a heap address, the address of the object where the data belong.
> I maintain that calling var() a variable is a mistake.

Your definition is very oddly specific and incorrect.  A "variable" is
an abstract concept that doesn't have anything intrinsically to do
with where something is stored in computer memory.  It's the notion of
giving a name to a value, so you can refer to the value by name later
on rather than having to duplicate the value itself everywhere.  It's
a value that varies, thus the name.  That's it.

Are you *really* trying to say that dynamically scoped variables
aren't really "variables"?  Lexical scoping isn't all there is, you

I'm not sure what you hope to achieve by arguing from a dictionary in
the first place, let alone doing so incorrectly.

>> Given that I think the primary use of custom properties will be to
>> define variables.
> A property cannot define a variable, this is simply illogical, isn't it? A variable is a compile-time concept, not a runtime one. When you change the value of a variable, it doesn't trigger any update, because a variable is just a memory space in the call stack. A property, on the other hand, is something that can have a getter & a setter, and that can trigger updates in chain because it can be bound to at runtime via observers. This kind of dynamic process is called a data binding.
> In SASS, they can talk about variables because this is exactly what they have: a compile-time concept which can be effectively substituted by their value by something as simple as Push Down Automaton. In CSS, we have to talk about data binding and references.

Once again, you're arguing from definitions, and doing so incorrectly.
 I have no idea why you think variables are only a "compile-time
concept".  It sounds like you've got your mind wrapped around a *very
specific* conception of what the words "variable" and "property" mean
(which doesn't even appear to come from CSS - perhaps C#?), and you're
assuming that they *must* always refer to *exactly* that concept,
nothing else.

Received on Monday, 11 February 2013 21:39:38 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:08 UTC