Pilgrimage back to C++
I think the title of the pilgrimage back to C++ is a nice allegory.
The last use of the programming language for more than bug fixing and small extensions for other OpenSource projects probably goes back to the standard C++98 and the version change from Qt 4 to 5.
I also used frameworks like gtkmm, wxWidgets and POCO in the past.
![](https://blog.n4v.eu/content/images/2024/06/cpp_logo-3.png)
There are now C++11, C++17, C++20, C++23 (2023) and C++26 is being worked on. There have been many innovations.
Particularly interesting is the work to make safe programming with C++ easier and as a default setting.
I have now spent some time with Rust projects and got to know the advantages of Rust.
But there are also some very serious disadvantages that make programming in the Rust environment tedious and frustrating.
Disadvantages of Rust
- rudimentary standard library
- no comprehensible development path for the language syntax and tools
- additional products in the form of libraries/crates are absolutely necessary as a quasi-standard without any kind of support scheme. This meant, for example, that the quasi-standard for time processing was unmaintained for a long time and a huge number of dependent crates were left staring into the ever-deepening tube.
- libraries are constantly changing, security and freedom from errors are usually only guaranteed to some extent in the latest version.
- new third-party products are constantly being elevated to quasi-standard status
- you may end up with 3 direct dependencies and an application with hundreds of indirect dependencies whose origin, code quality and developer reliability are unknown - no overview of dependency hell - with a minor version change, the binary size doubles due to externally added dependencies.
- popular projects under the control of individuals.
- no real object orientation - This mishmash of generics, traits, trait objects and the rape of enums for type conversion and error handling is not really fun. It's all kind of cobbled together to get the otherwise problem-free design patterns in compatibility with Rust's borrow checker.
- macros are not really macros whose generated code is relevant, but have in addition their own type and visibility check with corresponding bizarre limitations and not very helpful error reporting.
- the language is difficult to understand without an IDE missing type resolution due to the encapsulation in various result container types and automatic dereferencing into a wide variety of types with identical method names. Without an IDE, you have to work your way through the API and determine types.
- type conversion From/TryFrom etc. keeps getting in each other's way, so that some conversions are only possible using auxiliary methods. A lot of time is spent converting types between different libraries.
- the safe-language feature is extremely verbose in the case of concurrency or interior mutability. Everything has to be manually pasted into various auxiliary type classes or extra code has to be written for use in loops or threads, so that even in read access the borrow checker is given sufficient food for successful compilation.
- much poorer availability on various platforms. Manufacturers deliver C/C++ SDKs and it can take many a month/year for a Rust project and the compiler chain to be useable integrated.
- Many users are not aware of the limits of the guaranteed security at compile time. It is often expected that the compiler would recognize logic errors that lead to deadlocks or faulty memory accesses. That you could ultimately do what you want and the program would be guaranteed to come out of the compiler safely. For example, it does not matter that a web server project occupies memory in a vector or array based on the transferred Content-Length-HTTP header or that headers of any length and number are packed into the server's memory. Classic DOS attack surfaces.
- a lot of Rust code that is known to be performant achieves its performance by covertly bypassing the security features of the borrow checker from the outside and manipulating pointers/memory addresses.
- very young, conceited software developers who obviously feel their honor has been violated by critical questions about Rust.
Well, that's a surprising number of points. So it's no wonder that, contrary to the view of the happy Rust developer that's repeatedly spread on the net, I'm very divided about the hype surrounding Rust and don't see it as the big hit that it's far too often sold as.
Starting with the C++ Trip
So let's see how I feel about it after a few weeks back and a new project in C++.
The next step is to document a practicable, convenient and modern development environment with the necessary features for secure and maintainable C++ code.
Update: Okay, I lied. The next step was with the hedge trimmer. And here is an online IDE&Compiler: godbolt.org
The next step is published.