11 ms·
Does not classifying it as a programming language help this situation at all?
by exogen 8y ago
Does not classifying it as a programming language help this situation at all?
- kazinator 8y agoLocalPCGuy may just be responding to the grandparent comment which claims that it is: > Imagine a programming language that only had global variables. You have to carefully name your variables using complicated conventions in order to avoid any conflicts or unexpected behavior. Even your functions don't have local variables; there is no lexical scoping. Any function can overwrite or mutate what any other function is doing inside. There is no real encapsulation. That simply isn't true; CSS specifies a bunch of declarative rules, which statically evaluate. Though the evaluator may be stateful, reasoning about how the properties for each document node are determined doesn't require state. It requires reasoning about the targets of the rules, and when they overlap, about their relative scopes and priorities.
- exogen 8y agoI am the grandparent, and never mentioned anything about state. Not sure why state matters. Declarative CSS rules have effects. The scope of those effects can be both unlimited and unintended, and you can't "opt out" of being affected by rules – if some rule is targeting you, you're out of luck, unless you anticipate it and apply everything with the greatest specificity possible.
- kazinator 8y agoPardon me; I was thrown off by wording like "overwrite or mutate".