DEV Community

Cover image for The new reason for creating new languages
Winston Puckett
Winston Puckett Subscriber

Posted on

The new reason for creating new languages

In the beginning there was binary. Binary was not human readable, so then came assembly. Then the "higher level" language. All of these tried to address the problem of human readability. Bob Martin mentions in The Last Programming Language that some languages even go too far towards readability. With languages like Python and Java, we've finally nailed it. There are still tweaks to be made for readability, but we don't need to focus on readability as the purpose for new languages.

New aims

The modern language serves another purpose - guiding the developer toward smart decisions and catching tricky errors at compile time. Elm and Rust are two amazing examples of this new paradigm.

Elm

I first heard about Elm when I was researching Rust. Rust's ideas for coherent error messages first came from Elm. In the first video I watched, Annaia Berry said that after migrating to Elm, their portion of the product never ever broke and so never needed to be fixed. Because of this, there was no need for them to stick around. They accomplished what I have always wanted to do - create enough wealth to work yourself out of a job.

I feel like this is a significant story because it illustrates the power of a good compiler. By filtering out strange errors like race conditions, the compiler enables us to focus on features.

Rust

Started by Mozilla, Rust was created to eliminate the stupid errors which occur in C++ code. Like Elm, the magic of Rust comes from its compiler. If the compiler sees that you are doing something which could someday cause an error, it won't even let you compile the program. Here's an excerpt from their website:

Rust’s rich type system and ownership model guarantee memory-safety and thread-safety — enabling you to eliminate many classes of bugs at compile-time.

Rust also guides you to making what it thinks are good decisions. Catherine West talks about how it's really hard to create a game in a "traditional" OOP way at her talk at RustConf. This is because the creators believe that creating games with deeply nested object hierarchies is not the right way to do things. Instead, it's easy to create an ECS because this follows the structure that Rust promotes.

What this means for the future

I believe these types of super-compiler languages will increase in popularity. Because of this, interpreted languages will fall out of favor. In addition, because the languages developers use will have such helpful messages when things go wrong, the developers will also head toward friendly, informal messages in their programs.

Where to go from here

Ashley Williams's video on Rust and NPM is an amazing starter for understanding some of the reasons behind using one of these new languages.

Are there any languages which I could have mentioned in this post? Clojure maybe?

Top comments (3)

Collapse
 
tehaisperlis profile image
Hazmi Irfan • Edited

Elixir is one language I like to use. It brings new life to BEAM(Something like JVM). Usually you would use Erlang for BEAM but for me it's syntax is really hard to understand and intimidating.

Collapse
 
winstonpuckett profile image
Winston Puckett

That's right! Isn't Elixir built to handle concurrency at HUGE scale? I think I saw a documentary about it, but I can't remember if I'm remembering that right. I just visited your link and I'm really intrigued by it being dynamic and functional. I hadn't heard of a language doing that before.

Collapse
 
tehaisperlis profile image
Hazmi Irfan

Yeah that is one of the major selling point. Discord is one of the company that I know that uses it in production.