ryoblog/src/blog/picking-the-right-programmi.../index.md

18 KiB

title: Picking the right programming language for both newbies and professionals author: 寮 date: 2022-10-05 tags: technology,webdev,programming thumbnail: picking-the-right-programming-language.jpg threadid: AOG7Q6LpiCCe7oxXTE

If there was 1 language I would recommend to both newbies and professionals, which one would it be?
There are lots of programming languages, all of which are good and bad at stuff, some are better than others, some are worse.
I'll compare the following:
C, C++, C#, PHP, Ruby, Python, Javascript, Java, Go, Lua, Shell.

The ideal language is the following specs

Is non-bloat

What this means is that you don't need to have a high end Intel i29 processor, an Nvidia 2 billion XTI, a trillion Petabyte of RAM......no.
I want to be able to compile (or run) on old hardware without too much lag.

No mandatory object orientation

It's OK if the language in question supports stuff like classes, namespaces, and whatnot (rather not), but it should be optional and not mandatory.

Has official offline readable documentation

I want to be able to access documentation while on the go, in the train, in a cafe, in the jungle, on the moon, literally anywhere.
My smartphone is ALWAYS at home, I never take it with me, so I want to be able to access documentation without the need to have internet.
Other bonuses of that is that you don't have to worry about documentation requiring Javascript (if your offline documentation does, then it means it's broken, FIX IT!!), no worries about Cuckflare's "we're checking your browser" meme because it's offline.

Preferrably in PDF format, but TXT or HTML (or Tarballs for that matter) are OK too.
Please no EPUBs, nothing like that!

Can be written without an IDE

This should go without saying, but anything that requires an IDE because otherwise it's hard or impossible to read is an instant garbage language.
Especially if it requires an official IDE, developers of that kind of language need to be beheaded.

Clean, common sense syntax is a must

Syntax needs to be clean and make sense.
Unless it's ASSembly or literally machine code, I don't want to see something like "system.penis->cum[0].print('Hello world!')", humans are supposed to read and write the code, not half robot half alien half ghost type of franken-cyborgs.

Note: this is NOT a tier list!

C

First start with my most favorite language, the language that inspired just about every other language on this list, and the language that nobody cares about anymore.
Just so you know, when I say "C", I mean "ANSI-C", or "C89".

It checks almost all checkboxes.
The only thing it lacks is an official offline readable documentation, it does have an official book however.
But GNU's single page manual is pretty good too, it's online, but it's just a matter of pressing CTRL+S to save it locally, and it's literally the exact same thing, no internet necessary at all.
So I consider it to be acceptable, though not ideal.

Other than that, it's not bloated, not OOPs at all, can be written with just a simple text editor, syntax is clean and common sense.
Sure it has keywords like "strcat" and "char *variable", but you can still figure out what they mean pretty easily, and at the same time doesn't require much typing.

By the way, there used to be a PDF version of GNU's C manual, but I can't find it anymore, so I'll just host it for you.

#include <stdio.h>

int main () {
  char name[10];
  scanf("%s", name);
  printf("Hello, %s\n", name);

  return 0;
}

4 out of 5.

C++

Some people will tell you this is C on steriods, but I'd rather say it's like a frankenstein C.
It's bloated, though not by a lot if you compare to most other languages, but it definitely is compared to C.
Just like C, it doesn't really have an official online documentation (let alone offline documentation) and has an official book instead, though Cplusplus.com is considered to be the best online documentation, but it's not offline readable.
So just like with C, resort to a book, which is not ideal, but the additional problem is that the best resource is online-only.

It has OOPs (it was created for this very purpose), but it's not mandatory, so that's OK.
It can be written without an IDE, good.

Syntax is quite a clusterfuck, it makes your brain melt.

#include <iostream>

int main () {
  char name[100];
  std::cin >> name;
  std::cout << "Hello, " << name << std::endl;

  return 0;
}

FUCK!!
Like, what's wrong with the way it's done in C that you had to make it all so retarded!?

2 out of 5.

C#

Despite having "C" in the name, I always found it to have more in common with Java than with C.
Or put differently, an OK-ish version of Java.
It's made by Microshaft, therefore it sucks.
OK OK, let's not discriminate on who developed it, origin of the language isn't one of the 5 criteria.

It's bloated, has mandatory OOPs, has no official offline readable documentation (online only, excluding books), but at least it can kind of be written without an IDE, but it's not all that obvious.
Not to mention the fact that Microshaft maintains the world's worst documentation ever made.
Visiting the official documentation is like having a mystery to solve, and after wasting 8 hours in a library, you exit with even more mysteries to solve while none of the already existing ones have been resolved.

Microshaft has pushed C# to force people on to Visual Studio and .NET Framework, so 2 crimes in 1 go, incredible...
However, it's actually possible to write code without the 2.
I mean, Mono exists.

But the syntax is pretty reasonable at least, although to me the language always felt to me like playing with rubber.
C and C++ both feel more like metal.

using System;

namespace ItsaMeMario {
  class Hello {
    static void Main (string[] args) {
      string name;
      name = Console.ReadLine();
      Console.WriteLine($"Hello {name}");
    }
  }
}

1.5 out of 5.

PHP

When I say PHP, I really mean the vanilla PHP, not that weird ass .NET-wannabee framework PHP you'd see in things like Laravel, CakePHP, CodeIgniter, Zend Framework, Symphony, and whatever other frameworks are out there.
PHP is my 2nd favorite language, and one I'm the most familiar with.
PHP is technically a web framework for C, the language itself isn't just based on C, it's literally written in C, and many standard functions resemble C functions too.

It's bloat, as PHP does lots of stuff for you out of the box that most other languages don't.
It doesn't feel like bloated, but it definitely is.
The bloat does mean that there's barely any need for any external dependencies, which is actually a good thing.
The downside is that it results in breaking changes with every single major release, unless you're like me and make custom functions using only the most basic commands that will guaranteed always be part of the language (unless it turns out it's so buggy that it's beyond repair, like how "mysql" got replaced with "mysqli" and "PDO").

OOPs is optional (since PHP 5.whatever, can't remember exactly, but before that it used be to no OOPs at all), official documentation is readable offline as HTML files in a Tarball (other formats are also available), it can be written without an IDE (in fact, if you do use an IDE for PHP, I guarantee you every single PHP (again, I mean real PHP, not framework PHP) developer will consider you insane), and syntax is insanely basic, just about anyone can just pick it up and make stuff easily (which is perhaps why so many PHP frameworks exist, can't have you writing code correctly).

<?php
  $name = $_GET['name'];
  echo "Hello, ".$name;
?>

4 out of 5.

Ruby

Ruby is pretty different compared to the languages I mentioned so far.
I don't have lots of experience with that first hand, so I'll skip the bloat part.
It's not mandatory OOPs, though it kind of is if you're using Ruby on Rails.
It has official offline readable documentation, though you have to look for it.
It can be written without an IDE, though it's pretty rare to write in Ruby without the Rails framework for whatever reason (kind of like how it's rare to write C# without .NET).
Syntax is plain simple and clean, maybe it really is the ideal language for your girlfriend (or you if you happen to be a girl yourself).

#!/usr/bin/ruby

name = gets
puts "Hello, #{name}"

4.5 out of 5.
The half point is because I can't comment on the bloat, so I'll give it a half point as a benefit of doubt.

Python

The language that ALWAYS breaks if the Python intepreter version on your computer doesn't exactly match with the one the developer used.
And this is exactly my frustration with this language, considering that most Python devs tend to be on Ubuntu, which always run on incredibly outdated versions of everything, while I use Artix btw, so I will almost always have the latest version installed, and then I want to play around on Devuan, postmarketOS, and OpenBSD, each of them come with a different version too, FUCK!!

Code-wise, Python is not bloat, however the intepreter makes it incredibly bloat.
Plus every project, even if it's just a small 1 file script, requires quite a lot of dependencies to even work.
Just check your installed packages in your distro's package manager, notice how many of them start with "python-", "python2-", or "python3-", it's going to shock you.

From as far as I know, there's no OOPs at all.
Maybe there is if you use some weird framework, but the language itself seems to be as procedural as it gets.

There is official offline readable documentation.
It can be written without an IDE, and the syntax is clean, however it's NOT common sense!
When I saw an example code for Python, I couldn't distinguish it from plain text quite easily.
No round brackets around if/elif/else statements, no initialization like "<?php", "#include ", "#!/usr/bin/python", no static typing, and so on.

name = input("Name:")
print("Hello, " + name)

3 out of 5.

Javascript

The language I hate the most, not necessarily because the language itself is garbage, but rather because of how 99% of the JS devs abuse the language which is what turns it into garbage.
Likewise, when I say Javascript, I mean vanilla JS, and not Angular, Node, React, Vue, Express, Angular2, Electron, and whatever else is available nowadays, can't even keep up anymore.
And I also mean anything before ECMA.

The language itself is not bloat, in fact, it only has a handful of syntax and you have to write the rest by yourself, which is what made the language into the mess it is today, plus the lack of standards, every single JS project I touched had completely indistinguishable syntax even!
Even the "official" syntax is anything but common sense.

I'll have to show you to make you understand.

$ node
Welcome to Node.js v18.10.0.
Type ".help" for more information.
> typeof NaN
'number'
> NaN == "number"
false
> NaN === NaN
false
> Number()
0
> Number(undefined)
NaN
> 111111111111111111111
111111111111111110000
> [1, 2, 3] + [4, 5, 6]
'1,2,34,5,6'
> { [{}]: {} }
{ '[object Object]': {} }
> null < 0
false
> null == 0
false
> null <= 0
true
> 0 == []
true
> (![] + [])[+[]] +
...  (![] + [])[+!+[]] +
...  ([![]] + [][[]])[+!+[] + [+[]]] +
...  (![] + [])[!+[] + !+[]]
'fail'
> (null - 0) + "0"
'00'
> true + false
1
> 0.2 + 0.1 === 0.3
false
> 10,2
2
> !!""
false
> "4" - 3
1
> "4" + 3
'43'
> "4" + 3 - 1
42
> 

See this quiz for more insanity.
Not Cuckflared, but runs off Goolag soyvers, phones to Goolag, and also lags on top of that, so I recommend you visit it with uMatrix installed.

I skipped from 1 all the way to 5, but JS can't even execute anything in the correct order anyway, so it fits.
No mandatory OOPs, if at all that is.
It can be written without an IDE, it can be written directly in the browser if you really have to.

No official offline readable documentation, not even an official website.
The language was made by the original CEO of Cuckzilla, which then got kicked out from his own company by the woke, which fits with JS being a clown show, which also explains why documentation is online-only, which also explains why Brave is such a bloated clown browser made with Electron.
But the reason why I bring this up is because Cuckzilla's MDN is generally considered to be the official documentation, even though Goolag is the one pulling the JS strings harder than Cuckzilla, which by itself is technically owned by Goolag when it comes to income streams.

Like how C and C++ are languages for boomers, PHP and C# for millenials, Ruby for girls, and Python for zoomers and newbies, JS is the language for clowns.

let name = prompt();
alert("Hello, " + name);

2 out of 5.

Java

Java was originally made as an attempt to replace C and C++, which never happened, but it was extremely popular for quite a while.

It's BLOOOOOOOAAAAATTTT!!
And I mean like everything about it is bloat!
Mandatory OOPs.
Official documentation is downloadable, but requires you to sign (your soul away to) the EULA before they let you download, and perhaps it's only viewable with JS enabled, but not sure because I couldn't load the EULA page (and I wouldn't sign it anyway).
It can technically be written without an IDE, but the language itself requires so much bloat to even work with, it's basically like driving with triangular tires.
Syntax is beyond insane, hands down the worst language ever!

import java.util.Scanner;

class Hello {
  public static void main (String[] args) {
    Scanner scan = new Scanner(System.in);

    String name = scan.nextLine();
    System.out.println("Hello, " + name);
  }
}

0 out of 5.

Go

Finally a breath of sanity among 21st century languages.
Technically a Goolag product, but the company itself is barely even involved.
The language also happens to be made by the same people who made C over at Bells Lab, so it must be pretty good.

Go is not bloat, rather it's the anti-bloat.
The compiler even makes absolutely sure you don't make bloat, which on one hand is nice as it guarantees good code, but on the other hand it really destroys the whole point of having the freedom to solve problems in many different ways rather than just 1.
OOPs is not mandatory.

Documentation is online-only.
Aww, you were almost there!
You could easily have become the best language, but you fucked up on this one.
C'mon man!

It can be written without an IDE, and not using a framework is strongly encouraged, which is a very pleasant surprise in a world with a lack of devs who actually know how to code.
And syntax is clean and decent.
It's only a bit meme-ish to call a "function" a "func", but it does help saving up on key presses, so I'm fine with that.

package main

import "fmt"

func main () {
  name := ""

  fmt.Scanf("%s", &name)
  fmt.Println("Hello,", name)
}

4 out of 5.

Lua

Scripting language used primarily in video gaymes and Prosody, you can fully master it in only 3 hours, not even joking.

It's not bloat, there's only 25 operators, that's literally the entire syntax.
No OOPs at all.
Documentation is online-only, though it's one of the only online-only documentations that includes no surveillance at all, cleanest official documentation ever (only HTML and 1 CSS loaded from their own site directly, that's literally it).
But still not enough to make up for the fact there's no offline documentation available, as it doesn't help in places where I have no internet connection.
It can be written without an IDE.
Syntax is OK.

local name = io.read()
io.write('Hello, ', name, '\n')

4 out of 5.

Shell

More specifically, POSIX shell scripting.

It's not bloat.
Not OOPs at all.
Has offline readable documentation, usually ships with your OS by default (the man pages).
Writable without an IDE (most commonly written in Vim, Emacs, or Nano).
Clean, common sense syntax.

#!/usr/bin/sh

read name
echo Hello, $name

5 out of 5.
Hey look, the best programming language turns out to be a language that's not even a programming language!
Should tell you a lot though...

So basically, if this were a tier list (TROLOLO):

  • Kami-sama tier: Shell
  • Based tier: C, PHP, Ruby, Go, Lua
  • Just tier: Python
  • Retard tier: C++, Javascript
  • Garbage tier: C#
  • Would rather jump in an active volcano tier: Java

Minimal code ≠ minimalism

Very often people tend to mistake minimalism for minimal code.
Let's see how minimal it all is:

  1. Dev writes code in Lua, takes only 2 lines of code.
  2. Lua gets translated into C++, turns it into 7 lines of code (excluding HUWHITEspaces).
  3. C++ gets further compiled into ASSembly code.
  4. This ASSembly code ends up in machine language, which is nothing but 1's and 0's.

Every time machine translates code, it tries to do it in the least optimal ways possible, which is why hand written ASSembly code performs better than hand written Lua code, because even though at the end of the tunnel it's doing the same thing, a human who makes ASM code directly can make it as minimal as possible, but the machine doesn't care, it just sees all the bloat that got translated along the way, and takes it all for granted.

Similarily, a nutrisionist tells you to stay away from candy and eat more fatty meat and raw veggies.
A landwhale doesn't care, and will just eat whatever you feed it, so you might as well feed it fatty meat and raw veggies, but instead we all choose to feed it baked sweets, potato chips, senbei, coke, Big Mac, fried chicken, just all sorts of easy to eat junk food, but hey, at least they don't eat a lot of it!
And then we wonder why everyone around us is getting alarmingly obese.

Same is true with code; instead of making stuff in C to minimize the route from human to machine, we all choose to put as much many barriers between us as possible, and then we wonder why we need to constantly buy new computers with more RAM and better CPU all the time.

Back in the 1990's, we could run a web browser with multiple pages opened up, a fat word processor, an email client, an IRC client, a newsgroup client all on a PC with just 32 MiB of RAM, upgrading to 64 MiB was like space technology at the time.
Meanwhile, now we all have at least 16 GiB of RAM, and we can barely even open a 3rd browser tab with nothing else running without crashing the PC, and upgrading to 32 GiB still gets your fellow devs to cringe.
Can you guess what happened here?