DEV Community

Discussion on: So, how many of you respect CSS as a programming language?

Collapse
 
sshine profile image
Simon Shine

There is actually a reasonable angle to "CSS is not programming":

  • It is a declarative, domain-specific language
  • It is Turing-complete
  • That technically makes it a programming language, much like Minecraft then becomes a programming language because Redstone is Turing-complete.
  • The intent of CSS can be discussed, but uncontroversially: It is a styling language, like HTML is a markup language. Those are domains with supposed, intended limitations that got fuzzy over time.

The idea that a language isn't a programming language is not intended as degrading towards those who know it. It is intended to scope off the intent and purpose. A limited purpose makes a language more powerful for specificaly that purpose. Being general-purpose is not the holy grail of all languages. Most of my favorite languages have extremely limited scope: jq, regex, sql.

If you can write a 3D game in CSS, or an infinite loop in PCRE in spite of real regular expressions always being representable as finite automata, power to you. I hope it never reaches production. ;-)