3 ms·
> C or C++ let you free of lifetime annotations at the cost of crashes This is so very true. A lot of my time as a professional C and C++ developer is spent tr
by geofft 10y ago
> C or C++ let you free of lifetime annotations at the cost of crashes
This is so very true. A lot of my time as a professional C and C++ developer is spent trying to figure out exactly how long some previous programmer intended a value to live, whether it can be safely accessed in this context without a lock, etc. The ugliness of <'b, 'a: 'b> is vastly preferable to segfaults or corruption in production and days of debugging.
Anyway, time for me to go back to staring at why this machine isn't reinstalling because wget is hitting a null pointer dereference, but I'm sure wget's code is very pretty.
- Manishearth 10y agoI basically sigh with relief whenever I'm wrangling with some data in a large c++ codebase and discover that it is refcounted (which tends to be the case for most data where the question of possibly holding it past the lifetime arises). In rust, my reaction is the opposite -- I'm skeptical of every Rc I see and part of my mind immediately tries to see if it can be gotten rid of.