4 ms·
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 workin
by hannofcart 5y ago
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.
- pjmlp 5y agoUntil Rust gets the compilation story sorted out, what you save on the computer center gets spent in developer workstations.
- pas 5y agoDo 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 :)
- rapsey 5y agoC++ is slow as well.
- pjmlp 5y agoTrue, 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.
- rapsey 5y agoYou don't recompile those every time.
- pjmlp 5y agoIndeed, only every time I checkout something from github, update cargo dependencies or switch worspace.
- timw4mail 5y agoI would not use Gentoo if I had to compile the world to, say, update PHP.
- timw4mail 5y agoI would not use Gentoo if I had to compile the world to update PHP.