r/ProgrammerHumor • • Jun 01 '23

Meme HTML is not a programming language

Post image
9.1k Upvotes

500 comments sorted by

View all comments

Show parent comments

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.

43

u/jjdmol Jun 01 '23

People mistake the markup annotations of an HTML document to be computer instructions, I suppose.

0

u/[deleted] Jun 01 '23

[deleted]

1

u/lazyzefiris Jun 01 '23

HTML+CSS is turing-complete though?

0

u/[deleted] Jun 01 '23

[deleted]

→ More replies (3)

8

u/chronoflect Jun 01 '23

I mean, the annotations are instructions read by a computer to format the website. ¯_(ツ)_/¯

6

u/jjdmol Jun 01 '23

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.

→ More replies (1)

3

u/WhiteyDude Jun 02 '23

People mistake the markup annotations of an HTML document to be computer instructions, I suppose.

That's it, right there.

3

u/student_soup Jun 02 '23

People are so weird. HTML is a markup language not a programming, it's literally in the name.

I have no idea why things have to be classified specially as a programming language in order to be considered a 'real language' anyways. Who tf cares?

0

u/YawnTractor_1756 Jun 01 '23

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.

→ More replies (4)

26

u/Realinternetpoints Jun 01 '23

It’s right there in the name innit? Markup Language

0

u/[deleted] Jun 01 '23

[deleted]

-2

u/lazyzefiris Jun 01 '23

right there in the name is an awful argument. JavaScript has Java in the name.

→ More replies (6)

3

u/Intrexa Jun 02 '23

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.

9

u/MattieShoes Jun 01 '23

HTML is a programming language. It is not a procedural programming language.

https://en.wikipedia.org/wiki/Declarative_programming

2

u/modsuperstar Jun 01 '23

Well, you crossed that off the list today

2

u/MattieShoes Jun 01 '23

haha :-)

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."

-1

u/modsuperstar Jun 01 '23

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.

1

u/YawnTractor_1756 Jun 01 '23

HTML markup is a set of instructions for computer to follow. <body color=red> instructs the computer to performs a certain action.

Sure HTML is not a Turing-complete language, you cannot use it to calculate things or to manipulate data, but it does control what computer does.

3

u/[deleted] Jun 01 '23

Every input instructs the computer to perform a certain action, and if it's only to read your input.

By your definition everything you do on a computer is programming.

2

u/YawnTractor_1756 Jun 01 '23

If you save it as a repeatable pattern and can make computer execute that pattern again then yes, everything is programming.

0

u/[deleted] Jun 01 '23

And how is that useful?