Thiago Bueno Silva ▮


On Learning Different Programming Languages

This post is adapted from a presentation I gave at Optibus in 2024.

Over my career I’ve learned quite a few programming languages. Some were forced on me by circumstance, and some I picked up out of my own interest.

In the beginning I saw them as a means to an end. The goal was to get the job done.

As I grew as a developer, though, I started to enjoy learning something new for its own sake, and especially figuring out the philosophy behind each language.

Why learn new programming languages?

Each new language shows you a different way of solving problems. As Alan J. Perlis put it [ 1 ]:

“A language that doesn’t affect the way you think about programming is not worth knowing.”

Knowing more than one paradigm makes you a better and more flexible developer, and it shows up in the code you write.

Things to keep in mind

Knowing only a few languages doesn’t make you a bad developer. Some of the brightest people in our industry spent their careers in just a handful of them.

Also, some languages are just… bad. Some were created without much thought, or evolved into something completely different from what they were meant to be (hello, JavaScript, I’m looking at you).

The successful languages last for a reason. Newer ones usually show up to solve problems in a different way, or to fix some of the pains of the ones that came before.

Programing languages timeline

Examples from my journey

Ruby

Ruby taught me that code can be beautiful. It puts developer happiness and expressiveness first, and its metaprogramming lets you build DSLs tailored to your own needs.

set :haml, :format => :html5

get '/' do
  haml :index
end
Shoes.app do
    background "#EFC"
    border("#BE8",
           strokewidth: 6)

    stack(margin: 12) do
      para "Enter your name"
      flow do
        edit_line
        button "OK"
      end
    end
  end

(Examples of DSLs built with Ruby)

Go

Go taught me how much good tooling matters. I love how minimalist it is. Between tools like gofmt and goimports and the lack of abstractions, Go code is easy to read no matter who wrote it.

Go was also the first language I learned that was actually fast, with a compiler that targets many architectures. I’d seen good performance with Java before, but I never felt in control of my code’s performance the way I do with Go.

Clojure

Clojure was my first functional language. It taught me what immutability buys you and how to write code that’s easy to reason about. Because it’s a Lisp, it also introduced me to macros and REPL-driven development.

Building a developer toolset

Toolset

Over time I realized it’s worth keeping a well-rounded toolset, so I can pick the right tool for the job.

When I put mine together, I look for a language in each of these categories:

  • All-rounder: easy to pick up and good for fast prototyping
  • Web: runs in the browser
  • Functional: supports functional paradigms, for correctness and fewer side effects
  • High performance: for resource-intensive tasks

Here’s what I use right now:

  • All-rounder: Ruby. A joy to work with, simple and efficient.
  • Web: TypeScript. It helps keep me sane in the JavaScript ecosystem.
  • Functional: Clojure. Elegant and expressive.
  • Fast: Go (?). High performance, though portability has trade-offs.

The pick in each category may change over time, but this balance has worked well for me. At different points I used Clojure, Go, and even Python as my all-rounder, but I went back to Ruby because it’s so good for scripting.

How I evaluate a language

Every modern language has a reason to exist, and it’s often summed up right on its homepage:

Ruby is… 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. [ 2 ]

Rust: A language empowering everyone to build reliable and efficient software. [ 3 ]

Clojure is a robust, practical, and fast programming language with a set of useful features that together form a simple, coherent, and powerful tool. [ 4 ]

Before picking a language, I try to understand what problem it’s trying to solve and how it goes about it.

Language “skill points”

If you’ve ever played a role-playing game, you probably know about skill points: you get a limited number to spread across your character’s traits.

I think about languages the same way. Every language gets the same number of points, and you can see where each one spent them. No language maxes out every trait, so don’t expect one to.

These are the traits I care about:

  • Ease of use
  • Safety
  • Performance
  • Ecosystem
  • Adoption
  • Design and ergonomics

Language Skill Points

Conclusion

Learning new languages gives you more ways to solve problems and a better understanding of programming in general. Even a language you don’t use every day can change how you write code in your main one.

Language Comparison


  1. Alan J. Perlis, 1982. Special feature: Epigrams on programming. ACM Sigplan Notices, 17(9), pp.7-13. ↩︎

  2. Ruby Programming Language. https://www.ruby-lang.org/en/about/ ↩︎

  3. Rust Programming Language. https://www.rust-lang.org/ ↩︎

  4. Clojure Programming Language. https://clojure.org/ ↩︎