←back to thread

205 points michidk | 4 comments | | HN request time: 0.001s | source
Show context
dazzawazza ◴[] No.41835253[source]
Access to competant Rust developers can be a challenge even for large companies.

I recently finished a contract at a (very large game dev) company where some tools were written in Rust. The tools were a re-write of python scripts and added no new functionality but were slightly faster in Rust.

The reality was that these tools were unmaintainable by the rest of the company. Only the author "knew" Rust and it was hard to justify a new hire Rust developer to maintain this small set of tools.

The only reason these tools were written in Rust was because the dev wanted to learn Rust (a big but common mistake). I pointed out to the Technical Director that this was a big mistake and the teams had taken on a large amount of technical debt for no reason other than the ego of the wanna-be-rust-developer. Since I "knew" Rust he wanted me to maintain it. My advice was to go back to the Python scripts and I left.

replies(21): >>41835266 #>>41835268 #>>41835305 #>>41835386 #>>41835427 #>>41835460 #>>41835522 #>>41835570 #>>41835607 #>>41835745 #>>41835838 #>>41836318 #>>41836384 #>>41836673 #>>41836742 #>>41837344 #>>41839371 #>>41840322 #>>41840444 #>>41846616 #>>41848063 #
meindnoch ◴[] No.41835266[source]
>Only the author "knew" Rust [...] because the dev wanted to learn Rust

Many such cases. Recipe for disaster.

replies(2): >>41835352 #>>41835378 #
ahoka ◴[] No.41835378[source]
I think the rule of thumb should be that if you wouldn’t write aomething in C++, then you shouldn’t use Rust.
replies(2): >>41836000 #>>41846984 #
j-pb ◴[] No.41836000[source]
That's a horrible rule of thumb, because C++ adds a ton of complexity with little reward except for speed. Rust adds less complexity (still a lot ofc), but it also gives you awesome tooling and dependency management (much better than python for example), and and extemely powerful typesystem and functional programming features, that make writing correct code extremely easy.

Rust is a complex but overall good language for writing solid software, C++ is making a deal with the devil in exchange for speed.

replies(2): >>41837345 #>>41839760 #
cozzyd ◴[] No.41839760[source]
You missed the point of the rule of thumb. Maybe rephrasing it as if 15 years ago you would have written it in C++ would help.
replies(1): >>41839897 #
1. j-pb ◴[] No.41839897{3}[source]
Nope. C++ has mostly downsides, Rust has significant upsides.

A good rule of thumb would be: is correctness and code confidence more important than learning curve and compile times? If so Rust, otherwise JS or Python (with possibly parts in Rust).

replies(1): >>41846185 #
2. LunaSea ◴[] No.41846185[source]
C++ is incredibly fast and still the language of choice for a lot if not most computing intensive tasks.
replies(1): >>41847084 #
3. j-pb ◴[] No.41847084[source]
See my initial: > C++ is making a deal with the devil in exchange for speed.
replies(1): >>41853694 #
4. LunaSea ◴[] No.41853694{3}[source]
That really doesn't matter when the price of the devil's deal is cheap.

ie: security is rarely a problem when selling software