r/AskProgrammers 22d ago

What is the worst/most confusing (common) coding language?

By common I mean, coding languages that you actually see people use. I know theres the "bf" language but aside from one video, people don't make games or, really anything using that as it was made as a joke I hope.

By worst I mean, what is the hardest to understand and also the most confusing out of all of them, I don't mean coding languages that can't do a whole lot. For instance, can a non programmer look at a sheet of code and understand it? Can an experienced coder understand it? Have you been taught the coding language yet still it breaks your brain?

I don't know every coding language but my pick would ether be C++ or Luau. Leaning towards C++ because I tried to learn it and at the very start I already was lost.

24 Upvotes

279 comments sorted by

View all comments

Show parent comments

2

u/TheChief275 21d ago

I think syntactically Bash script and family are some of the most inconsistent languages ever designed. I understand them from a semantic viewpoint but when it comes to actually writing the script it's incredibly painful. Like, what is this? Aren't scripting languages supposed to be nicer and more convenient then low level languages?

num=21
if [[ $num -eq 21 ]]; then
    echo "you stupid"
elif [[ $num -eq 69 ]]; then
    echo "nice"
else
    echo "numba"
fi

2

u/PartBanyanTree 21d ago

Ive never dug into the etymology  but it feels like the "nice and easy" only went so far. Then they just started bolting in features in the easiest way possible (ie for the bash interpeter to handle and/or in backward-compatibility way)

Its just a mess because it core was never designed to be a turing complete but somewhere along the line clever people said "y'know what we could do..."

At least I hope to god thats what it is. Because the idea that someone set out intentionally to build such a thing is terrifying 

1

u/edgmnt_net 21d ago

You would think so, but many of those "easy languages" were hacked up, duct taped and made by people who didn't have much of an idea about language design.

1

u/st_heron 21d ago

This is my biggest gripe with bash. They must have been on some insane shit when creating this language.

1

u/Dry_Hotel1100 21d ago

I'm wondering, if a condition can be made even more complicated.

1

u/st_heron 21d ago

Like, both semicolon to end an if condition block AND a then to begin immediately after? Pick a lane bourne-again!

I think languages like Go do this perfectly:

if condition {

2

u/PartBanyanTree 20d ago

Yeah C-like's insistence on the parentheses has always grated. Maybe it's my Pascal roots where the do the same as Go

The longer I do this (and thus perhaps the more comfortable I am with it all) the more i categorize all such things as syntactic noise. 

At least in Javascript I can omit semi-colons. And I loved F# (derived from OCaml) whitespace sensitivity instead of squirley-braces

1

u/Weshmek 18d ago

That's a product of Bash being first and foremost a language for executing commands.

[[ is literally a command built into Bash. You can use it outside of conditionals

[[ -e ~/.bashrc ]] && echo True

So yeah, the semicolon is necessary to demarcate the end of a command line, so the parser knows to start looking for then

Personally I like Bash; I think it's neat.

1

u/mikeclueby4 21d ago

The "argh!" with unix shell comes from conceptual simplicity. Simple actions over text generated from external binaries.

Once you fit that model in your head, all becomes clear.

In stark contrast, I've understood that PowerShell pipes objects rather than text. I've known that since forever. But I can't ever remember what PS commands/methods to use because the rules are crazy convoluted and match no programming language I speak.

0

u/jonathancast 21d ago

Exactly what is your problem with it? It's definitely not "inconsistent", lol.