logoalt Hacker News

fookeryesterday at 12:04 PM2 repliesview on HN

Safe threading sounds great, as long as the language gets out of my way when I absolutely do not care about safe threading.

I write compilers (and have contributed to the Rust compiler!), and there has been approximately zero times in twenty or so years that thread safety has been a concern.


Replies

vlovich123yesterday at 2:34 PM

I don’t buy at all that you’ve coded in a language like C++ and thread safety has never been a concern. Either:

1. You work on esoterically simple problems where nothing is worth threading (implied by you questioning whether it bought any meaningful performance).

2. You code in languages like Rust where it’s not a problem or significantly less of one (Go, Java, c#, Haskell, Ocaml, etc).

You’re being awfully dismissive of people who’s experiences don’t match yours, especially when it seems like your experience isn’t the norm.

show 2 replies
timschmidtyesterday at 12:08 PM

I write a bit of everything, including a little Rust CAD library which is a continuation of work I did in C++ 20 years ago. The C++ version was never multithreaded. The Rust library was fully multithreaded in an afternoon by importing Rayon behind a cargo feature, and using par_iter in place of iter in a few hot loops. That alone made the rewrite worth it.

show 1 reply