Re:Things you can’t do in Rust (and what to do instead)
by hu3 on Saturday May 15, 2021 @02:00PM
(#27167420)
> However, when you get to millions or billions, maybe you have to optimize and create a backend. What should this backend be written in? Previously the answer might have been C++. But now it's Rust.
Now it's Rust based on what? Uber backend is almost entirely built in Go. And so are many other services handling billion plus requests a day written in other languages.
Perhaps Rust advocates know something that Uber engineering does not.
Re:Things you can’t do in Rust (and what to do instead)
by est31 on Saturday May 15, 2021 @10:38PM
(#27170764)
Go usage proves my point. It's statically compiled. In fact, Google wanted a language in the same performance class as C++ but that was easier to teach to college graduates. Rust is also such a language. Furthermore, when Uber got started, Rust hasn't even been available.
Re:Things you can’t do in Rust (and what to do instead)
by hu3 on Sunday May 16, 2021 @03:47AM
(#27171969)
Rust being easier to teach than C++ is a very low bar to clear.
And for the record, when Uber got started Go wasn't available either.
Re:Things you can’t do in Rust (and what to do instead)
by golergka on Saturday May 15, 2021 @09:56AM
(#27165277)
> However, when you get to millions or billions, maybe you have to optimize and create a backend. What should this backend be written in? Previously the answer might have been C++. But now it's Rust.
Neither Facebook, nor Instagram or Slack are primarily built on C++ or Rust though. And many other products that I can't as confidently remember from the top of my head aren't.
Re:Things you can’t do in Rust (and what to do instead)
by est31 on Saturday May 15, 2021 @10:36PM
(#27170754)
Facebook originally did compile their PHP to C++ though. https://en.wikipedia.org/wiki/HipHop_for_PHP
Only later did they introduce Hack and HHVM, which compiles a PHP dialect in a just in time fashion. My point is that once you reach scale, and your computer bill becomes significant enough, you'll really want to use efficient languages.
Personally, being a Rust enthusiast, I think that Rust's benefits don't just unleash when you think about performance, but also when you think about large codebases. Such codebases are usually the scene for refactorings. In a dynamic language like js, these are extremely hard to pull off. In Rust, the compiler won't stop yelling at you until you have cleanly finished the refactor. I love refactoring Rust codebases, even ones I didn't write, while in C++ or other languages it's extremely annoying.
And note that while C++ enthusiasts might have believed that everything should be C++, not everyone followed them. Many people still stayed with C. Many still do even with Rust around. But there is a small group of people for whom Rust is such a great improvement that they take the portability cost and switch to Rust. Linus is heavily anti C++ for example, but he's open to adding Rust to the kernel.