Making a case for Go – for PHP developers!

Making a case for Go – for PHP developers!
4
Oct

Making a case for Go – for PHP developers!

Developers usually take their programming language of choice very seriously. Which makes sense since it’s probably the tool they spend the most time using. We get attached to our languages, and debating the merits of various languages can get… passionate.

However, languages are tools. Some tools are better for different jobs. Every developer runs into that problem that cannot be solved by their language of choice.

I love using PHP, and often use it in my work at Google. Often when I need to write up a quick demo of something cloud based and I’m only using it for myself – I use PHP. It’s the language I’m most productive in. In fact, my last Open Source demo (whack-a-pod, Kubernetes as a whack-a-mole machine) for Google was written in PHP. But I’ve run into two cases that left me wanting to learn and use a new language.

  1. Collaboration: Most of my co-workers use other languages. The main supported languages are: C++, Go, Java, Python, and JavaScript. Others are used here and there, and we do have a few teams that use PHP. But my team does developer outreach for the entire Cloud, we’re all polyglots. So the language I chose to work with the most people here was up to me. I had dabbled in Java before. I didn’t want C++ or Python, and I already knew client side JavaScript, so I wanted to branch out and learn something new. Go fit the bill and I started going down the path of learning it. Along the way, I discovered a fun, powerful language that is very different from PHP in most ways. Compiled instead of interpreted. Strict syntax instead of more forgiving. Go usually allows for one way of solving a problem, where PHP offers many. Go is built for computer performance – PHP for developer productivity.

  2. Tools: I needed something with which to write utility programs . Now normally, you write some shell scripts for this sort of thing, and if you need more, you use a scripting language like Python for it. I could do that. Or I could have used PHP via command line. Or I could challenge myself to learn something. Go worked for this. Instead of writing scripts I write executables.

While these languages are very different – in my opinion – they share a fundamental feature that makes them complementary – both are languages for people who want to get their work done. They aren’t always elegant or academically clever, but pick them up and you will be productive. They both have a great deal of functionality built in and ready to go. Both are built for the post web computing era, with features like http handling and other communication paths built right in without needing the basic runtime to be extended.

My session “Go for PHP Developers” at International PHP Conference is about learning Go as a PHP developer. My hope is to not convince you to switch completely to a new language. That would be crazy. My hope to introduce you to a new tool you can use when you reach the limits of your current one. And to get you to try and use it. Looking forward to seeing you in Munich!

Stay tuned!

Behind the Tracks of IPC ’18

PHP Development
Best Practices & Application

Web Development
Web Development & more

Web Architecture
Concepts & Environments

Performance & Security
All about Performance & Security

Agile & DevOps
Agile & DevOps methodologies

JavaScript
All about JavaScript

Testing & Quality
All about Testing & Quality