| It's NOT unrelated. It is a real world demonstration of the simplicity possible by custom modeling of allocation and lifetime concerns instead of buying into a fixed scheme set by a language. No, it's claiming that because someone can do something that there must not be a better way to do it. Games were written in assembly, that doesn't mean that's the best way to do it. I've been arguing all day You've been avoiding it all day then finally making claims after six replies. vector<T> or whatever, you will have a bad time if you don't model T's destruction with a C++ destructor too So? What do you think that looks like in C? For loops and nested for loops, which all need to be hand written or copy and pasted and to happen at the right time. If you start dealing with early returns or gotos you need to have all those nested for loops copy and pasted multiple times. I explained why: internals have to get moved to public API in practice. This makes no sense, you would just move something into a function if it needs to take ownership. In C you have nothing to indicate ownership and every function in every API needs to have auxiliary documentation to say whether it is going to own the memory you give it or not. Why are you being so stubborn? I keep asking for the same thing and you keep running away from it. Destructors (like other methods) practically require classes to be fully exposed This doesn't make any sense, it automates something you have to do any way. ON GODBOLT? Are you kidding me? Is there something wrong with an actual program that shows actual evidence? This seems like a basic demonstration is earth shattering to you. I CAN NOT explain to you what sucks about it in a godbolt. If you can't demonstrate it with actual source code then you just have claims and no evidence. |
I can NOT demonstrate it in a tiny godbolt because the effects I am talking about don't apply on a micro-scale.
I CAN demonstrate it with actual source code, but you are unwilling to look it up. You are disagreeing without making the tiniest effort. Not being willing to make an effort by itself is fine. But you're being contrarian in the worst and laziest way.
Do you not understand the concept that I can't explain the world to you from the ground up? You say no to everything without trying to understand it. Your "rebuttals" indicate you're not willing to follow me in the slightest and you reject even the most common lore (for example the thing about C++ class features (destructors, methods...) leading to exposure of internals in public headers, leading to every TU including the world). Or you are intentionally trolling me. You are being uncooperative and you're the single worst interaction I've had on this platform. Now please get off my lawn.