Re: WebKit now supports CSS Variables

Simetrical wrote:
> There *should be* nothing in software default CSS that admins
> of a specific installation can't change.  Likewise, there *should be*
> nothing in a site-wide stylesheet that a particular section can't
> change.  Constants give flexibility where you *don't* need or want it,
> in the highest and most general layers, and take it away where you do,
> at the most specific level.

I am not sure I understand your concerns.

"admins" will be the first people who will benefit from @const.

They will define constants. Developers will use them.
Constants cannot be overwritten. So "admins" can sleep calmly.

In CSS you can overwrite everything. Already.
@const gives CSS new feature - ability to define
things that cannot be overwritten. So you have
more choices: you can use constness and/or you can use variability.
That in principle creates more design possibilities including
modularity through parametrization.


>> For @conts, there is a big benefit of NOT
>> allowing any stop along the line to change the values. It is the same reason
>> programmers sometimes use constants instead of variables, and why they are
>> usually at the beginning of the program code.
> I know of multiple programming languages (Python, bash) with no
> concept of constants at all.  I know of none with no concept of
> variables.  Language-enforced constants are totally unnecessary for
> programming, and probably they only exist because in compiled
> languages they can be more easily optimized than variables which
> happen not to change.  None of the scenarios you've given have shown
> any benefit that I can see from unchangeable constants -- assuming
> that local stylesheets come after more global ones, which they
> generally do because of how CSS has worked to date.

And I know programming languages that support modularity so
have constants. One of them is a next version of JavaScript: by the way.

And by the way you should refresh your Python knowledge.
You can define immutable class attribute that is exactly 'const'
or 'final' if you know Java.

Andrew Fedoniouk.

Received on Monday, 30 June 2008 05:17:47 UTC