It's just in the definition of the word. A "program" is a series of steps or instructions for a computer to follow. HTML isn't that, it's more akin to a blueprint.
HTML describes instead of instructs though. It's simply metadata interwoven with data.
One could go for the data = code route, but that would make even text files programming languages. Could be valid, computers are Von Neumann machines after all, but would render the concept "programming language" completely useless.
With that logic no interpreted language is a programming language, since no interpreted code directly produces computer instructions. And if doing it indirectly is fine, then HTML does that too, in a limited way, sure, but it does.
This is totally a definitions thing. I have fairly liberal definition of a programming language to be any language that can produce a set of instructions that can advance a finite state machine from a known state to an arbitrary state. Under my definition, HTML and SQL are definitely in.
"A computer" has a much more broad definition than most people realize. It's more than just a universal Turing machine. They're really good, and flexible, so, they do kind of dominate. A computer is a machine that computes things. That's it. Analogue computers have existed for thousands of years. I believe that since a combinational logic circuit can not have it's operations affected beyond the current inputs, it can't be programmed. A finite state machine is the lowest level of computer that can require a sequence of inputs to produce a specific output, which is why I believe that it is the most primitive computer that can qualify as being programmed.
"Program" has a lot of historical usage for setting a finite state machine to an arbitrary state. You can program a VCR. You can program a thermostat.
"Languages" have hierarchies for their grammar. If it's important that a language be Turing complete, we can specify that the language is a type-0 grammar on Chomskys hierarchy. Advancing a finite-state machine to a specific state requires a language with a type-3 grammar.
So like, HTML is a computer programming language. It's not powerful, it's not as flexible as C, but it's a programming language.
There's a big difference between HTML and a procedural language... But there's a big difference between a compiled an interprted language too, right? And gatekeeping is lame anyway, so really it's just, "maybe your definition of programming language is too narrow."
It really is bizarre. If people don’t view it as a programming language, then you’d figure they’d be super proficient at writing it. Compare it to essay writing then, a lot of devs har har about HTML, then you see their markup looks like a Grade 7 book report that needs significant revisions.
50
u/SarahSplatz Jun 01 '23
It's just in the definition of the word. A "program" is a series of steps or instructions for a computer to follow. HTML isn't that, it's more akin to a blueprint.