News for hackers. Stuff that matters.
Re:Sayonara, C++, and Hello to Rust by hannofcart on Tuesday December 07, 2021 @05:14AM (#29470841)
I think you're right in the power and expressiveness of C++ templates and in how "modern C++" is a joy to code in but I suspect you have the privilege of working in a codebase that does not have much legacy C++ that you have to maintain.

Most large C++ codebases that have been running in production over decades are unfortunately a Frankenstein's monster written in a mix of old style C with classes C++ code full of malloc and free footguns, heavily OOP driven prefer-inheritance over composition era code full of virtual destructor footguns, and the modern nicer RAII std::unique/shared_ptr memory management based C++ code. And a lot of template and macro magic thrown in across each of those eras.

So you can get really productive in modern C++ pretty quickly and it can be an enjoyable experience. But to maintain a large old C++ codebase you are going to have to grok a lot of stuff. So much that I really can't find too many people who can hold it all in their head. I certainly can't.

Finally, am not sure if there was a hint of derision about Rust being primarily used for web services but I think it's a great thing if the next generation of web services will be developed in something as efficient as Rust rather than more resource hungry counterparts like Python or JS. Good for the balance sheet. Good for the environment. Good for the web devs who get expressive easy to understand code with a lot of guard rails built in.

Re:Sayonara, C++, and Hello to Rust by pjmlp on Tuesday December 07, 2021 @05:39AM (#29471023)
Until Rust gets the compilation story sorted out, what you save on the computer center gets spent in developer workstations.
Re:Sayonara, C++, and Hello to Rust by pas on Tuesday December 07, 2021 @06:03AM (#29471184)
Do you mean compile time?

> what you save on the computer center gets spent in developer workstations.

um, that cat is already out of the bag. unless you work on mobile or web frontend most backends are big, ugly, have a lot of dependencies, running them needs ALL the RAM anyway :)

Re:Sayonara, C++, and Hello to Rust by rapsey on Tuesday December 07, 2021 @07:03AM (#29471521)
C++ is slow as well.
Re:Sayonara, C++, and Hello to Rust by pjmlp on Tuesday December 07, 2021 @07:28AM (#29471684)
True, except the tiny detail that the usage of binary libraries is common in C++ culture.

Building from scratch Gentoo style not so much.

I seldom compile third party dependencies.

Re:Sayonara, C++, and Hello to Rust by rapsey on Tuesday December 07, 2021 @08:05AM (#29472000)
You don't recompile those every time.
Re:Sayonara, C++, and Hello to Rust by pjmlp on Tuesday December 07, 2021 @10:33AM (#29473506)
Indeed, only every time I checkout something from github, update cargo dependencies or switch worspace.
Re:Sayonara, C++, and Hello to Rust by timw4mail on Tuesday December 07, 2021 @09:06AM (#29472556)
I would not use Gentoo if I had to compile the world to, say, update PHP.
Re:Sayonara, C++, and Hello to Rust by timw4mail on Tuesday December 07, 2021 @09:06AM (#29472557)
I would not use Gentoo if I had to compile the world to update PHP.