DEV Community

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

Collapse
 
kallmanation profile image
Nathan Kallman

CSS is turing complete so.... even by your definition it is a programming language.

Collapse
 
urielbitton profile image
Uriel Bitton

It is not turing complete. If you read my comment, i prove it solves the halting problem, therefore by deduction it is not turing complete...

Thread Thread
 
kallmanation profile image
Nathan Kallman

CSS can encode Rule 110
Rule 110 is known to be Turing complete
QED: CSS is Turing complete


To comments about halting; to actually "compute" in CSS requires "pumping" (clicking or key taps). This is not substantively different than the "pumping" a clock does to our computer chips (they just do it "automatically"). Yes CSS will halt for any given execution cycle between these "pumps"; but comparing that to the halting problem in general means that I can argue our CPUs are not Turing complete because they are guaranteed to complete execution of any single instruction. If CSS is not Turing complete neither is my computer and by extension any programs executing on it.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Try scrolling down to the second answer on that SO question; it makes a fairly good argument for why CSS isn't turing-complete at all.

Thread Thread
 
urielbitton profile image
Uriel Bitton

But that's exactly what i'm saying as well haha