Hacker News new | ask | show | jobs
by tedmielczarek 1470 days ago
Original rust-minidump author here: I started out by doing a pretty straightforward port of Breakpad into Rust, which I had just started learning at the time. I figured that learning a new language by porting a codebase I was intimately familiar with for a content area that I knew extremely well would make it so only the new language was the hard part. (It worked out well!) I did try to make the API more idiomatic Rust in places, since there are parts of Breakpad's API that are fairly C++-centric. I was also using Rust 1.0 originally, so it didn't quite have all the niceties available in the current Rust release.

All that being said, I would choose Rust over C++ for any new development anywhere. If my boss told me we had to use C++ for a new project I would actually quit. I've worked on plenty of C++ codebases (including Firefox) in my career. Sure, you can write bad code in any language, but C and C++ are just bad languages.

(I also ported Mozilla's sccache tool from the original Python implementation to Rust, which was a fun exercise. The Rust version is in production use in a wide variety of places, and AFAIK is still the only ccache-like tool that can cache Rust compilation.)

2 comments

> Sure, you can write bad code in any language, but C and C++ are just bad languages.

Let's give them credit for what we've achieved using them. I would definitely pick Rust over C++ any time, I respect C++ for all the cool things it gave us.

If they are bad languages then you should give most of the credit to the programmers that were using them.
I wish I could upvote this more than once :) The unsung heroes out there are the developers who takes over a garbage dump of a system and turn it around. That is way harder than writing a system from scratch.
Yep makes sense. My point was that the developers matter more than the language. However you are absolutely right that good developers with a better language will do better.