Every time I see that posted I wonder how that'll work in practice. I'm interested to know if there is any real world example of that in from of a useful library. Filesystem, Graphics, Threads, Algorithms, or whatever is there. And obviously not a C library,
Why the fuck would anyone using C++ revert to using shittier constructs voluntarily? It's not like you get any performance benefit out of it. In fact it would be slower because you'll end up re-implementing vtables when most compilers don't even use them.
Name:
Anonymous2016-06-10 4:47
>>8 structs are more efficient, dont have vtables and are backward compatible with C. You can also convert any memory area to struct, without caring about contructors/destructors. In other words, stucts are the blunt tool that does the job done.
Any sane, non-toy implementation in C that uses structs will end up having vtables like GObject, often reimplementing dynamic dispatch and "generics" with void*
and are backward compatible with C
Only through self-enforcement. "struct" in C++ has almost the same semantics as "class".
You can also convert any memory area to struct
You can do this in C++ as well with a copy constructor.
Name:
Anonymous2016-06-10 6:18
C = normal boring sex C++ = BSDM gay sex with scat in the end.