3 ms·
I don't know how much experienced you are with modern C++, but the language has in fact evolved to be more usable and high level :)
by yati 13y ago
I don't know how much experienced you are with modern C++, but the language has in fact evolved to be more usable and high level :)
- evincarofautumn 13y agoMore usable, yes. Usable, no. I’ve been working in C++ for about ten years, since a couple years after I started programming. It’s certainly gotten better over time—particularly in terms of containers and ownership semantics—but it’s still not good exactly. For instance, it’s possible for mortals to write exception-safe code now, but still not memory-safe code. I spend an inordinate of time language-lawyering for my coworkers to avoid future debugging hell, and though in my opinion I don’t even know the standard all that well, I’m certainly among maybe a few dozen people at my company who come close to knowing it in full. It’s just an absurd source of artificial expertise that needs to die.
- 5hoom 13y agoWhat problems have you found trying to write memory safe code? It seems to me that you barely have to think about memory ownership anymore ever since unique_ptr and shared_ptr came along.
- evincarofautumn 13y agoI suppose my main gripes are that moving is not free, you can reuse moved-from objects, and there is no story for checked borrowing of unique_ptrs—you have to use raw pointers or weaken the ownership semantics to shared_ptr so that you can use weak_ptr for safe borrowing. Not to mention that shared_ptr is often semantically questionable and used as an inefficient alternative to a garbage collector.
- 5hoom 13y agoFair enough, good answer :)
- yati 12y agoYes, even I kind of agree that the language still has loads of baggage(read: warts) it could do without. "artificial expertise" got me thinking for a while, frankly :) Also, I think Rust has kind of nailed ownership semantics - makes my life a lot easier when the compiler assists me with those things.