3 ms·
Anyone know if the first con listed has improved with the introduction of non-lexical lifetimes?
by faitswulff 8y ago
Anyone know if the first con listed has improved with the introduction of non-lexical lifetimes?
- glennpratt 8y agoI would say it has improved quite a bit, but they are still there. It varies quite a bit on what you are doing. At work we have a modest sized project, converted from C, being used and updated for about a year. I don't think it has had any significant lifetime battles; I don't think there are even explicit lifetimes in the source. Data structures exercises will be a different story.
- bfrydl 8y agoThe specific problem he is referring to should now be fixed with NLL, yeah. That doesn't mean lifetimes aren't still hard to learn at first, though.
- amalcon 8y agoI'm not the author, but from my perspective: Yes. Dramatically. Non-lexical lifetimes eliminated the most common cases where the compiler was just wrong. Of course you still need to think about lifetimes, and sometimes warp your program around them. However, it is now much less common for that thinking to arrive at "The compiler is wrong; how can I convince it of that?"