Yes? Things will vary depending on how the pension is structured, but simply speaking a job offering $50K in salary to a 21 year old is a better economic choice than a job offering $47K+$5K in funds locked up until they turn 65. That $3K delta becomes nearly $30K assuming a 7% growth rate in a stock ETF.
You have completely misunderstood the author's point - a misunderstanding that would have been easily avoided by reading just a little bit more of the 23 pages of detailed exposition which is very clearly not the outcome of a 'lack of effort'
The data race is exactly the kind of subtle bug that even very experienced programmers would make in this circumstance.
The patches that Linus posted are relatively small and self contained and from reading the thread it seems came from a series of in depth conversations with Claude and were carefully reviewed by Linus.
So what we're seeing here is a tricky concurrency bug that even an expert would make. You can't use it as an example of slop
That's incorrect; the compiler drops q before l. Drops happen in LIFO order; and the compiler knows that it can't drop l before q has been dropped, because q contains a reference to l.
The issue is that the destructor of q can observe a reference which is about to be deallocated as having a 'static lifetime (i.e. it will live forever), and can thus stash it away somewhere for other code to access after it's been freed (as in the examples in the issue which demonstrate UB.)
My thoughts as well. The problem can be alleviated either by making the ownership change an error or "just" invoking the destructors in the correct order.
A 'static lifetime constraint on T says: types that satisfy T must not contain any borrowed value/content whose lifetime will be shorter than the life of the program.
So the compiler assumes it is guaranteed, that 'l' still exists, so it doesn't consider it in regard of finalizer ordering.
reply