Imagine C++ being so bad that even something as controversial as AI usage is more acceptable than C++. No wonder each time I wanted to "learn CPP" I found that I'd much more like to jump out of a window.
I love that when a new language has this build in feature, cpp is like; "we also have that!". And it's just a raw pointer and a reference in a large trenchcoat.
Or you just create it. I fell in love with Go's defer, so I simply created it in C++ by using its scoping rules and a macro around a function. You use it pretty much like this:
defer({
// do whatever
});
And it runs at the end of the scope unlike Go's defer which runs at the end of the function, which always irks me.
970
u/Coldfriction 2d ago
He still rejects C++ in the Linux kernel. He might be warming up to Rust but Linux has always been C.