For all intents and purposes, a markup document is a script that outputs a document. There’s no point in saying the HTML isn’t a programming language. Not all languages have to be general purpose.
The bar for me is whether the language describes an executable program that has state and control flow.
You could perhaps be generous and describe the DOM as a (write-only) state and the parser as a control flow. I don’t, personally.
HTML is just a data container format to me. Belongs with the likes of XML, JSON, JPG, PNG, GIF, MP3, MOV, etc.
The umbrella term I’d use for all of these is “coding”. That’s the skill of understanding structured languages and format specifications, and understanding how you can and can’t piece things together to make something coherent. This is a critical requisite skill to programming. But programming is more.
Programming is the art of juggling of state and control flow in clever ways to trick funny rocks into computing something you don’t know. It doesn’t need to be general purpose, but I would argue it indeed needs to have a purpose. It has to be something more than just a pile of declarations you know from the outset. Otherwise it’s just structured data.
Stateless functions still deal with state, they just don’t hold onto it. Without state to mutate, a so-called stateless function doesn’t do anything.
In declarative languages, your state is the sum of everything you’ve declared. You don’t query results out of thin air. Computational results logically conclude from everything you set up.
HTML ““has state””, as in it has a DOM, but it doesn’t do anything with it. You don’t mutate the DOM after it’s built, or query the DOM to compute results that weren’t trivially evident from the state you declared.
You can do those things with JavaScript. But all that proves is JavaScript is a programming language, and HTML is just a data format it can interact with.
The umbrella term I’d use for all of these is “coding”.
Saying “it’s not programming it’s coding” is like engineer “it’s not dirt it’s soil” levels of pedantry that are silly to expect people outside your profession to know.
Coding is, like, the smallest aspect out of all of programming. And unfortunately the part that’s the most fun.
But if you’re a coder, I assume you don’t know how to design complex systems, just (maybe) implement them or parts of them. That’s not what defines programming.
(Disclaimer, in all fairness: that’s in my personal, layman opinion as someone who doesn’t know much theory. I might just be very very in the wrong here, lol.)
Sure. Which is why I would only make this distinction in a place where I can reasonably expect people to know better. Like, perhaps, a niche community on an experimental social media platform dedicated to programming.
For all intents and purposes, a markup document is a script that outputs a document. There’s no point in saying the HTML isn’t a programming language. Not all languages have to be general purpose.
The bar for me is whether the language describes an executable program that has state and control flow.
You could perhaps be generous and describe the DOM as a (write-only) state and the parser as a control flow. I don’t, personally.
HTML is just a data container format to me. Belongs with the likes of XML, JSON, JPG, PNG, GIF, MP3, MOV, etc.
The umbrella term I’d use for all of these is “coding”. That’s the skill of understanding structured languages and format specifications, and understanding how you can and can’t piece things together to make something coherent. This is a critical requisite skill to programming. But programming is more.
Programming is the art of juggling of state and control flow in clever ways to trick funny rocks into computing something you don’t know. It doesn’t need to be general purpose, but I would argue it indeed needs to have a purpose. It has to be something more than just a pile of declarations you know from the outset. Otherwise it’s just structured data.
So, writing stateless functions, or working in declarative languages doesn’t count?
Stateless functions still deal with state, they just don’t hold onto it. Without state to mutate, a so-called stateless function doesn’t do anything.
In declarative languages, your state is the sum of everything you’ve declared. You don’t query results out of thin air. Computational results logically conclude from everything you set up.
HTML ““has state””, as in it has a DOM, but it doesn’t do anything with it. You don’t mutate the DOM after it’s built, or query the DOM to compute results that weren’t trivially evident from the state you declared.
You can do those things with JavaScript. But all that proves is JavaScript is a programming language, and HTML is just a data format it can interact with.
Saying “it’s not programming it’s coding” is like engineer “it’s not dirt it’s soil” levels of pedantry that are silly to expect people outside your profession to know.
Hey, maybe you are engineers after all lol
But it’s true.
Coding is, like, the smallest aspect out of all of programming. And unfortunately the part that’s the most fun.
But if you’re a coder, I assume you don’t know how to design complex systems, just (maybe) implement them or parts of them. That’s not what defines programming.
(Disclaimer, in all fairness: that’s in my personal, layman opinion as someone who doesn’t know much theory. I might just be very very in the wrong here, lol.)
Sure. Which is why I would only make this distinction in a place where I can reasonably expect people to know better. Like, perhaps, a niche community on an experimental social media platform dedicated to programming.
That’d be nice, but it’s obvious who is and isn’t a programmer in this one.