Langshighlevel

High Level Languages #

VM/Runtime Based #

[TODO] explanation of VM

Java #

1
2
3
4
5
class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!"); 
    }
}

This is Opinionated Guides, so let me be clear, I really, really hate Java.

It’s a language that didn’t even become popular on its own merit, instead Sun Microsystem paid a fuck ton of money to push it- hence the “3 Billion Devices Run Java” Thing.

I’m hopeful (albeit probably naively) that Oracle (Which bought Java from Sun) making Java a mess of licensing as the ‘main’ Java Virtual Machine goes paid (Read on Wikipedia) and suing Google will be the nail in the coffin for education using it and that it will die out with time. See Criticism of Java

So, frankly, I’m not even going to give Java an honest effort here. Use literally anything else.

There are a few things you should know about Java only because at one point or another, it may become relevant.

  • Java code compiles to “java bytecode” which runs on the “java virtual machine” (JVM).
    • This means (in theory) any platform with the JVM should be able to run Java programs with no incompatabilities.
  • Java programs could once be made into “applets”. That’s dead now.
  • Java source code is stored in .java files
  • The compiled code becomes java bytecode in .class files
  • These class files can be collected into a .jar, which is the final executable program if the user has a JVM installed.
  • Sometimes, the .jars are wrapped into an executable which bundles the JVM
  • Java used to be the goto for Android development, now Kotlin (see below) is better for that in most cases.
  • Java Jars are often relatively easy to de-compile compared to other programs in complied languages

And, no, there’s no connection between Java and JavaScript.

Kotlin #

1
2
3
fun main(args : Array<String>) {
    println("Hello, World!")
}

https://jakewharton.com/shrinking-a-kotlin-binary/

JavaScript #

Fine. I’ll talk about JS. But, please. For the love of god, do not use this to make an Electron App.

Before going too far, I do want to mention that a chunk of my hatred for JS is solved using frameworks and that I totally acknowledge the utility of JS for making quick, often very cool, ‘sketches’. The creative coding community is amazing. Further, JS, as much of a total dumpster fire as it is, is responsible for the Internet as it is today, whether that’s a good thing or not.

CoffeeScript #

https://coffeescript.org/

TypeScript #

https://www.typescriptlang.org/

Frameworks #

https://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks

Angular #
React #
Vue #
Node #

PHP #

1
2
3
4
5
6
7
8
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>

PHP is a language focused on making websites with sever side logic (process on the server, instead of JS in the browser). While a large portion of the web has moved to JavaScript frameworks PHP is still a good option for many tasks, and isn’t very hard to read.

PHP as a language is hated on, a lot. This is mostly because of historical decisions to not use typing, but type hints have been added for a while and it’s actually quite nice today. It’s not many people’s language of choice, but it works. Still, I wouldn’t fully recommend it. As mentioned above, Go is doing quite well in the networking space due to it’s ease of parallelism and abundant libraries for tasks that would’ve classically been PHP’s job.

Another option is Hack,

Dart #

Language made by google for making apps, but mostly web apps.

Hack #

1
2
3
4
5
6
use namespace HH\Lib\IO;

<<__EntryPoint>>
async function main(): Awaitable<void> {
  await IO\request_output()->writeAllAsync("Hello World!\n");
}

Hack, https://hacklang.org/, is Facebook’s (🤮) answer to PHP. They needed something safer, salable, and designed in this century. It’s syntax is PHP like, but it has easy async like Go. It also includes more intelligent ways of writing UI code to avoid XSS & Injection attacks.

Ruby #

A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.

https://www.ruby-lang.org/en/

Perl #

“Perl” is a family of languages, “Raku” (formerly known as “Perl 6”) is part of the family, but it is a separate language which has its own development team.

… I’m not a big Perl fan, but I have to mention it only because of how bizarre it is that they used the ⚛ character for atomics . (Though that, among other choices, lead to it being split into another language, raku )

Python #

Cython

Cython is an optimizing static compiler for both the Python programming language and the extended Cython programming language (based on Pyrex). It makes writing C extensions for Python as easy as Python itself.

https://github.com/exaloop/codon

Haxe #

1
2
3
4
5
class HelloWorld {
  static public function main():Void {
    trace("Hello World");
  }
}

Haxe is an open source high-level strictly-typed programming language with a fast optimizing cross-compiler.

https://haxe.org/

Go #

1
2
3
4
5
6
7
package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

The big claim to fame for go is its go keyword, which lets you do really easy threading. (https://gobyexample.com/goroutines). This has made it a favorite among those writing networking utilities and servers - just look at the list of programs that use it on its Wikipedia page.

Crystal #

1
puts "Hello World!"

Crystal’s big thing is that it’s similar to Ruby (a very fast to write language) that’s compiled and so quite fast. Additionally, it makes some sane choices to check for common problems at compile time. It also has good C interop. Check it out at https://crystal-lang.org/.

It may not be well suited to every task due to how abstracted it can be, but for quick solutions with decent performance, it’s a good option and fairly mature compared to other languages (Such as Nim) which aim to do similar things.

C# #

1
2
3
4
5
6
7
8
9
namespace HelloWorld
{
    class Hello {         
        static void Main(string[] args)
        {
            System.Console.WriteLine("Hello World!");
        }
    }
}

F# #

Swift #

Because Apple.

WebAssembly #

WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable target for compilation of high-level languages like C/C++/Rust, enabling deployment on the web for client and server applications.

https://webassembly.org/

While not technically a programming language, I wanted to bring it up and encourage you to look into it to be used instead of JavaScript for real projects. You can use a large portion of the languages mentioned above to write Webassembly.

Additionally, there are languages where WebAssembly is the primary target, such as https://www.assemblyscript.org, a TypeScript variant.

Things that are right on the edge of eso-langs but I’ll allow ’em: #

Noulith #

slaps roof of [programming language] this bad boy can fit so much [syntax sugar] into it

https://github.com/betaveros/noulith

https://blog.vero.site/post/noulith


If you would like to support my development of OpGuides, please consider supporting me on GitHub Sponsors or dropping me some spare change on Venmo @vegadeftwing - every little bit helps ❤️