RE: [css-variables] Variables used without prefix or function


[Tab Atkins Jr.:]
> 
> On Thu, May 24, 2012 at 7:54 AM, Christoph Päper
> <christoph.paeper@crissov.de> wrote:
> > Christoph Päper:
> >>
> >> I’m still a fan of using variable names verbatim, i.e. no prefix, no
> function notation, no nothing:
> [snip proposal]
> 
> I don't see what the benefit to the author is of making variables be
> simple keywords.
> 
> This would make it hard to spot variables in use, as they look just like
> every other keyword.  It would make it confusing to combine with other
> keywords.  It introduces the need for precedence rules which mean that
> *sometimes* an ident is a keyword and other times its a variable.

While many programming languages do not decorate variable names that is imo
largely because the vast majority of their variables are user-defined i.e. 
there is no risk confusion. In fact, when such languages do define some 
variables - e.g. to hold certain pre-defined constants or environment 
parameters - they often use a naming convention meant to distinguish them 
from regular variables (i.e. not just because they might be constants). 

So I strongly agree: CSS is loaded with keyword values that would be 
indistinguishable from user variables and it would be very helpful to be 
able to spot and search for user-defined values from those built in CSS.
> 
> This suggestion has a lot of bad usability problems, and the benefit is
> that you can omit a single character (the $ prefix).  This seems pretty
> easy to reject.
> 
Agree.
> 

Received on Thursday, 24 May 2012 16:51:28 UTC