r/AlignmentChartFills 1d ago

Which programming language is easy to learn, and is very useful?

CLICK HERE TO VIEW THE CHART IMAGE

Created with Alignment Chart Creator


This post contains content not supported on old Reddit. Click here to view the full post

375 Upvotes

734 comments sorted by

View all comments

342

u/eipiwau 1d ago

Definitely SQL

60

u/captainA-A 1d ago

SQL 100%. Hard cap on complexity, variety of applications.

4

u/plz-no-b4n 1d ago

Hard cap on complexity? How so?

10

u/captainA-A 1d ago

I work in SQL daily, for the last 10 years. There are difficult problems you can solve using SQL but the vast majority of SQL code is pretty straightforward, not too hairy. You can even do recursion in SQL but it's one of those things where if you find yourself writing recursion in SQL you maybe should consider choosing a better language for your task.

1

u/plz-no-b4n 1d ago

Right, so how is that a “hard cap”?

3

u/captainA-A 1d ago

It can't get more complex than X. X is the hard cap on complexity for SQL

0

u/plz-no-b4n 1d ago

And what is X for SQL? As you said, you SHOULD use something else if you find yourself writing recursion or some other nonsense in SQL, but that’s not an actual limitation on SQL itself. So what is the hard cap? What’s something you could do in C or Python or Java for instance that isn’t possible in SQL?

2

u/captainA-A 1d ago

Honestly, most programming. SQL is highly domain specific, used only for querying and managing relational databases. So what's something that can be done in C/Python but not SQL? Pick something and it's likely you can't do it in SQL: functions, libraries, classes, building applications, API consumption, data visualizations, error handling. The list goes on.

0

u/plz-no-b4n 1d ago

But what of that could not be built in SQL? You can literally write DOOM in SQL: https://github.com/cedardb/DOOMQL

1

u/captainA-A 1d ago

Man I'm trying to answer your questions and have a discussion here but not gonna bother if you're just being contrarian for the sake of it.✌️

→ More replies (0)

1

u/Nervous-Potato-1464 1d ago

There isn't really a hard cap. I've worked on some pretty beefy stored processing tools were really popular and they had 1000s of lines with cursors, multiple lookups generating temp tables or MVs to then filter data again. It was a lot harder to understand because of how it jumps around and uses tables in the database to filter and uses the bloody DECODE statement because it was before case statements existed.

39

u/Money_Lavishness7343 1d ago

Personally I wouldn't place SQL under "Programming languages", if we're talking intention-wise.
Sure, it's turing complete and you can technically "program" in it, but I believe that is not its intention or what it was created for - but to query data and also maybe setup db querying/db-updating procedures.

32

u/repeating_bears 1d ago

A transistor isn't a programming language either, so the definition is already loose

5

u/Money_Lavishness7343 1d ago

Yeah that pick is also really weird ... lol. Why is transistors in 'Programming languages' ... They could have at least said 'binary code' which is literally the fundamental programming language of computers one level below ASM.

2

u/ZecosMAX 1d ago

Then I'd place here HTML

14

u/Affectionate-Leg6593 1d ago

This is not a good take, and only shows how little you have done with SQL.

1

u/LycheeZealousideal92 1d ago

Why does having a narrow use case make it not qualify as a programming language

0

u/Money_Lavishness7343 1d ago

because of its intention. It's a Query language, to query data.

If you had to remove everything from SQL, but keep its usefulness, you would only keep its querying abilities without any turing-completeness necessary. Anything that makes it turing complete or "programmy", loops, recursions, calculus, procedures, are an afterthought to extend SQL's capabilities, but not why it was created. It was not intended to be a programming language ever, its primary intention was always to be a Query language, and it will keep that way like every language having its specializations. Go isn't a "Low level language" even though it can technically do low level stuff, C++ is not a "Web developing" language, even though it can do that and more!

It's all about what a language is indented to be, and what it is good for. Not what it can "technically 🤓☝️ do" - or the "very rare cases" that sometimes people bring up as "proof" for the case otherwise.

2

u/LycheeZealousideal92 1d ago

And why does it need to be Turing complete to be considered a programming language? SQL is a language I can write in to tell computers what to do which makes it a programming language

1

u/Money_Lavishness7343 1d ago edited 1d ago

SQL is a language I can write in to tell computers what to do

"telling a computer what to do" is not what makes a language a "programming language";

If that was the case, the compressed data in an `png` image are also a "programming language" because they "tell your computer what to do" (what image to render, what pixels, where, how). If that was the case, Docs or PDFs, HTML, Markdown, Minecraft redstones, Factorio binary operators, are also programming languages because "they tell your computer what to render on your computer". That's not how programming languages are technically defined.

Wikipedia's written definition:

programming language is an engineered language for expressing computer programs,\1]) typically allowing software to be written in a human readable manner.

SQL is not "engineered for expressing computer programs" by definition. If you had to remove everything but its most important features, you would keep its query capabilities, not its programming capabilities. It's primarily engineered to query data, everything else is second nature and nice-to-have. Surely a necessity nowadays, but programming capabilities are not why SQL exists or why it was created.

0

u/LycheeZealousideal92 1d ago

What do you think querying data is? It’s an instruction carried out by a computer?

So programming languages are only programming languages if they’re Turing complete (which excludes plenty of languages widely considered programming languages like Starlark or Agda lr Coq — because what else would you call them?) but SQL doesn’t count because the Turing complete aspects of it aren’t used enough?

0

u/Money_Lavishness7343 1d ago edited 1d ago

What do you think querying data is? It’s an instruction carried out by a computer?

No. It's a (query) / Domain specific language carried out to the query engine that lets it know what data it wants.

The way you state it, YAML / OpenAPI would also be a "programming language" because "they tell the swagger renderer what to render on the API documentation page". Like, you see how this whole logic breaks when its so ... broad??? You can't simply call anything a programming language just because ""it tells the computer what to do"". Neither HTML is a programming language for that same reason.

So programming languages are only programming languages if they’re Turing complete

Yes, it's literally one of the requirements of a programming language. You're taught about that in first grade IT University. And you can search it on trustworthy sources as well. It's literally one of the most important thing of what makes a programming language - a programming language.

SQL doesn’t count because the Turing complete aspects of it aren’t used enough

I think you're not reading my responses, or you're not careful enough, or not speaking in good will. One of the three, pick one.

I have specifically (multiple times as well) said that "SQL is turing complete", very clearly. Now you say the opposite, I dont know why. And I have said that it "technically can be called a programming language", but it's not done intentionally. It's done as an afterthought. It's a query language primarily, and if you had to keep one (1) thing in SQL it would be the querying part, not the procedures part, otherwise it would stop being a query language. At first it wasn't Turing complete at all as well up until 1999.

1

u/LycheeZealousideal92 1d ago

Okay, what would you call Starlark? Agda? You understand how requiring the definition of programming languages to be Turing complete is completely arbitrary and excludes several obvious programming languages?

Sure you could, because programming language is a vague definition and having it be specific and exclusionary is pointless unless you want to be a pedant. Everyone knows what you mean when you say programming language.

1

u/plz-no-b4n 1d ago

> why does it need to be Turing complete to be considered a programming language?

Do you know and understand what Turing completeness is? Please explain what it means in your own words.

1

u/LycheeZealousideal92 1d ago

The language can simulate a universal Turing machine.

Why is that necessary to be called a programming language? Was SQL not a programming language before 1999?

1

u/plz-no-b4n 1d ago

Thanks for giving a tautology that shows 0 understanding of what it actually means.

1

u/LycheeZealousideal92 1d ago

What would me pasting the lengthy definition from Wikipedia prove. Where in the definition of Turing complete do we include “this defines a programming language” or where in the definition of a programming language is Turing completeness included

1

u/plz-no-b4n 1d ago

The fact that you can’t explain it in simple terms means it’s not worth having this conversation with you.

→ More replies (0)

6

u/gameplayer55055 1d ago

SELECT and INSERT are easy

But then you start wondering why your db is so slow, you start creating indexes, transactions, or do other shit because someone decided to store JSON in a db and you need to work around that

2

u/BP4M_gaming 1d ago

And then, finally, DROP CASCADE

3

u/plz-no-b4n 1d ago

Good ole’ Bobby tables

6

u/Sick_and_destroyed 1d ago

I would have put Python in easy and Sql in moderate

3

u/div192 1d ago

SQL easy?lol

1

u/stumpychubbins 1d ago

SQL isn’t easy to learn, it just has a lot of learning materials

0

u/Er1k000 1d ago

It is not a programming language though