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

49

u/Demistr Jun 01 '23

SQL definitely is a programming language.

37

u/vonabarak Jun 01 '23

Very debatable. Some dialects (like PL/SQL) are programming languages or at least can be used as programming languages. But SQL in general isn't Turing-complete and isn't a programming language. It is query language.

81

u/maximal543 Jun 01 '23

Deba-table?

25

u/[deleted] Jun 01 '23

The most sane discussion member here

24

u/DannarHetoshi Jun 01 '23

"Drop Table mic"

18

u/TehBens Jun 01 '23

I don't see how not being turing complete stops something from being a programming language.

19

u/[deleted] Jun 01 '23

Some SQL implementations are turing complete, for example PostgreSQL

I would argue Turing-completeness doesn't define a programming language, although it is a part of it. So SQL is still not a programming language even in Postgres.

A more general definition is a language meant for writing programs, and neither HTML docs nor SQL queries are supposed to be programs, although they are interpreted by programs

20

u/TehBens Jun 01 '23

A more general definition is a language meant for writing programs

Yeah, that's it. It's so weird ppl refuse that simple truth. Talking about turing completeness sounds much more smart, however.

4

u/[deleted] Jun 01 '23

It's a vehicle for helping to explain to people why we don't actually write HTML by hand anymore. I'll go out on a limb here and say that scribing HTML actually sets you back on your quest to become gainfully employed as a FE developer in current_year

Like especially now with generative AI. Just ask ol GPT to write your HTML and get good at asking them.

→ More replies (6)

15

u/theggman_ Jun 01 '23

it's a declarative programming language so it is, in fact, a programming language

4

u/BoBoBearDev Jun 01 '23

I am pretty sure SQL is turning complete. It is just ridiculous hard, like iterating a loop using recursion in SQL.

→ More replies (1)
→ More replies (7)

16

u/Darkstar197 Jun 01 '23

I love SQL to death, but it is a query & database management language. Not a programming language

17

u/evanldixon Jun 01 '23

Sql is indeed a programming language, but after seeing some stored procs with thousands of lines, I wonder if it really should be

12

u/mountaingator91 Jun 01 '23

It's almost like we already have a great naming scheme for programming, markup, styling, and query languages and the different languages in each category fit perfectly in the category they were literally designed to fit in. Why all the debate about reclassifying languages in categories that they were never designed to fit into

11

u/K_Kingfisher Jun 01 '23

100% this.

If only the people who created the languages being discussed here went that extra mile to include that exact classification as part of their acronym, then these arguments wouldn't exist... /s (just in case)

5

u/[deleted] Jun 01 '23

after seeing some stored procs with thousands of lines

Those are written in extensions to SQL that allow imperative programming, which most popular SQL implementations have.

9

u/evanldixon Jun 01 '23

I see. Thanks, now I know what specifically to hate

→ More replies (2)
→ More replies (1)

9

u/[deleted] Jun 01 '23

[removed] — view removed comment

16

u/more_magic_mike Jun 01 '23

In that definition then HTML is also a programming langauge. It is a set of grammatical rules for instructing a computer to perform the task of displaying a web page correctly.

→ More replies (1)

4

u/DontListenToMe33 Jun 01 '23

If you’re using SQL to write programs, then something is amiss. It’s meant to be used to query and update databases, not to be a calculator or something like that.

8

u/Twombls Jun 01 '23

Ive seen and worked on 1000+ line long sqls before. In the olden days people used to do actual business logic with it. Its considered bad practice now. But its still a programming language.

6

u/DontListenToMe33 Jun 01 '23

Not getting sucked into this debate. No thank you.

→ More replies (4)
→ More replies (4)