3 ms·
> Something like a file or connection is already not just 'plain old data' though. OK? But now you need to… have two different mechanisms, when one can do both
by masklinn 4y ago
> Something like a file or connection is already not just 'plain old data' though.
OK? But now you need to… have two different mechanisms, when one can do both?
> In my mind, 'data' are the pixels in a texture (while the texture itself is an 'object'), or the vertices and indices in a 3D mesh (while the 'mesh' is an object), or the data that's read from or written to files (but not the 'file object' itself).
This “data” does not have a destructor, and thus is not a concern.
> C is all about data manipulation (the 'pixels', 'vertices' and 'indices'), less about managing 'objects'.
I think that would be news to every C program I’ve written.
> there are plenty cases in C++ where they are not
In which case you can just not have them, and not care.
> A 'defer mechanism' is just the right sweet spot for a C like language IMHO.
If by “a C like language” you mean “a language refuses to take any complexity off of the user’s back” then sure.