Zero to Hello World, tldr
Summary of the D, Go, Rust, and C++ results
2023/02
Impetus
My programming journey started when I was just a child…but seriously, here is my language path in an ish order.
- C# v2?
- Ruby
- Python
- C++98
- Java
- PHP (just a tidbit)
- JavaScript/TypeScript
If this was plotted on a chart, it would look like n!, factorial. Slow start from C# to PHP, then to the moon with JavaScript. Recently, I’ve found an abundance of free time and an idea. I put some functional and non-functional requirements on paper and started looking across the programming landscape for language to stake my claim. C++ was the best fit for my back of the napkin requirements, so I grabbed a copy of Professional C++, 5th Ed. by Mark Gregoire and dug in. Looking at the a table of compiler support, MSVC and Visual Studio looked like the easiest place to start. After a couple chapters, I decided to check my work on linux and promptly fell off a cliff.
After about three days of frustration, it was either change professions or try a different language. Scouting the landscape again, I saw D, Go, and Rust. I’m not operating at FAANG speed so an optional garbage collector is the least of my concerns. I have dabbled in Go more than the other two and already selected it for part of the architecture, maybe just write the whole project in Go? I see the RESF comments frequently so maybe Rust?
I built a Hello World project in D, Go, Rust, and C++, testing how fast I could go from no project to working code. The most common packages between all the languages was an http server; although, this is not one of my requirements. I’m more concerned with developer ergonomics and maximizing my time than garbage collectors and provable memory safety. Realistically, I’ll be lucky to drive a language at 80% of it’s ability.
tldr;
D
Zero to Hello World in just under 30 minutes. Community is small. Not much existing code to pull from. How much code am I willing to write?
Go
Zero to Hello World in 10 minutes. A fair amount of existing code and large standard library. Easy to read and write. About half of the overall performance compared to the other, but still fast enough. Easy single executable.
Rust
Zero to Hello World in about 20 minutes. So many dependencies compared to the others. Harder to read and write, but many freely available learning materials.
C++
Zero to Hello World in 4 hours across 2 days. Language good, tooling ugh. By far the most expensive in both time and money; however, copious amounts of existing code…if you can build the project.