Markup languages are just declarative programming at its best
For the common folk working with a markup language is 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.
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.
Hey, maybe you are engineers after all lol
So, writing stateless functions, or working in declarative languages doesn’t count?
Not really. If so, you might as well consider the stuff you can use to format a comment here on lemmy, as “programming”. That’s conceptually more similar to HTML as what programming actually is.
quote
some title
Etc.
Yeah… there are macros to handle formatting. Next you’ll say Scratch isn’t programming either.
If a language can’t store information and retrieve it later, then there is a limit to its usefulness. There are problems it cannot solve.
That’s OK, because not every language needs to be do that in order to serve its niche, but it’s not a programming language.
As I said, not all programing languages are general purpose. Just because there are problems it can’t solve does not mean it’s not a programming language.
No. Markup languages are configuration for an interpreter.
inb4 code is configuration for a compiler and binary is configuration for a processor
Actually, there are plenty of interpreted programming languages, for example Perl or Shell Script so that definition is incorrect.
HTML is not a programming language because it only defines form (how things look), and does not control action (executing operations by itself).
The language for Web Development that controls the execution of operations (say: if the user fills a certain field, fetch related data from a server and display it in certain page areas) is called Javascript and is separate from HTML (which existed before Javascript and can exist without it).
Modern Web standards have also moved a lot of the form stuff to yet another language - CSS, Cascading Style Sheets - which is more powerful and reusable, so HTML is more used for the visual structure of the page and less for things like the fonts of the various pieces of text, though it still contains support for that stuff and you can still use it.
But also, you’re making a computer do what you want, and something that it wasn’t programmed by the factory to display, when you write HTML. You’re programming.
Fair point. There’s a fine line between programming and creating data that a program operates on. I tend to think writing text to produce nontext output is more programming than not.
HTML5 + CSS3 is Turing complete, but just basic html is not.
52 down: What you say if you’re angry.