I keep coming back to Go

October 10, 2024

For most of my career I've been programming in PHP. It still is the language I use for most work I do for clients. Recently I realised that Go is the programming language I keep coming back to for my own projects.

I tried Elixir, a functional programming language

A little while ago, I wrote about learning Elixir. I never worked with a functional programming language before, so I gave it a try. There's a lot to like about Elixir. There's a certain elegance to it's syntax, the code looks fairly pretty. Elixir clearly takes some inspiration from Ruby in that regard. Further more, pattern matching covers a lot of scenario's where you would use if statements in other languages. A smaller amount of if statements makes code look clean and pretty.

I gave Elixir a fair shot by committing to it for a few months. I mostly built web applications using the Phoenix framework. If you have no experience with functional programming, I can highly recommend trying it out. And Elixir is a great language to make that dive. Still I came to the conclusion that Elixir, at this moment, is not for me. I kept feeling lost quite regularly. Nothing that I couldn't solve. I just didn't feel at ease with the language.

PHP allowed me to get into programming

When in high school, I discovered PHP. It allowed me to make the websites I already created (in plain HTML) more dynamic. It also defined my carreer as a software developer. I was an ecommerce developer for a few years, working with Shopware. Shopware is an e-commerce platform based on Symfony, a PHP framework. I have spend most of my carreer as a developer writing PHP code. I still do today, most of my freelance projects are programmed in PHP.

Learning Go during the holidays

Two years ago I discoverd Go. One of my clients has a few tools in production that are written in the language. I knew enough to keep them running and that was all that's required. The language intrigued me, though. I was curious to learn more. During the christmas holidays I build a few projects with it. I wasn't a big fan of it's syntax, but I was immediately amazed by how easy I could pick it up. I'm aware that years of programming experience is an advantage when picking up a new language. But that doesn't mean you can pick up any language easily. Rust, for example, is not something I can become productive in in a matter of days.

After having learned the basics, I didn't have much need for Go in my work. So I didn't use Go for a little while. In my free time I was learning other languages as well, to see what's out there. But every now and then when I had to build something small for my work, to automate a process or whatever, I didn't hasitate to reach out for Go. Everytime I felt super productive.

Go makes me want to program

Over time, I kept coming back to Go. It's just a fun language to build tools with. For my personal projects, I almost exclusively use Go. This blog is the one exception, altough that might change in the future. I enjoy writing Go code so much. It's simple and performs really well. I feel like I can move and refactor rather quickly and easily. In short: it suits me really well.

I recently heard David Heinemeier Hanson (while guest on ThePrimeTime, talking about Ruby) mentioned a photographers' saying; the best camera is the one that makes you want to go outside and take photos. That made a lot of sense to me. I feel the same way about programming in Go. It's the language that makes me want to program.