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

0

u/[deleted] Jun 01 '23

[deleted]

0

u/[deleted] Jun 01 '23

Executing what?

C, Java, Rust, etc it's all just text with keywords that get compiled/interpreted.

Yes. And the difference is that they have keywords necessary to write programs. If I remove one keyword, if, from the C syntax I make it unusable as a programming language.

HTML has no control flow facilities, no way of handling input.
Hence: not a programming language.


<label>What is your name?</label>
<input type="text" id="name">
<div>
    <if valueOf="name" op="equals" stringVal="John">
        Johnny, good to see you again!
    <else>
        Hello ${name}, nice to meet you!
    <endif>
</div>

HTML would have to have something like that to be a programming language.

1

u/meyerdutcht Jun 02 '23

Declarative languages generally don’t have control flow. Are none of them programming languages? My “programming languages” coursework included prolog- no control flow there.

1

u/[deleted] Jun 02 '23

Declarative languages have logic associations. HTML doesn't have that either.

HTML has no way to process input, react to it, produce variable output accordingly. It cannot even add two numbers.

With HTML you describe a user interface with no functionality.

Anything you can achive with plain HTML you can achieve with MS Paint.

→ More replies (5)