3 ms·
If you blindly embed everything by value religiously, you deserve neither flexibility nor correctness nor performance. I don't know what 'deserve' is supposed
by CyberDildonics 3mo ago
If you blindly embed everything by value religiously, you deserve neither flexibility nor correctness nor performance.
I don't know what 'deserve' is supposed to mean, but I just showed how to get all three.
don't forget to group data by access patterns and write patterns
Values on the stack are going to be grouped together and they are going to be in cache.
You realize using two heap allocations means twice the frees, twice the heap contention from multiple threads and chasing through two pointers for every data structure access right? In what universe does this work better than a single pointer lookup?
Making many micro optimizations can backfire
This is an even more handwavey than usual.
All I'm saying is that destructors, while they may seem convenient, are way overrated and the systemic issues caused by reliance on C++ classes and class features (including destructors) are still not well enough understood by the mainstream in 2026.
You can say that but you have given zero evidence of any of this. It took you a very long time to even get to your claim, maybe now you can start to back it up.
Meanwhile I gave extensive evidence based on your own examples of how the same bugs have happened over the last 50 years and double indirection and vague ownership cause problems on small and large levels.
- jstimpfle 3mo agoYou don't understand even the first things of what I say. That's because you apply beginner level concepts and understand to argue, and are not looking for nuance or deeper understanding at all.