Re:Why I Write Games in C (yes, C)
by z3phyr on Saturday September 21, 2019 @01:31PM
(#21036680)
If C gets operator overloading and RAII, there will be no good reason to use C++ for me!!
[ Parent
| on HN ]
Re:Why I Write Games in C (yes, C)
by FrozenVoid on Monday September 23, 2019 @01:27AM
(#21046164)
Only operator overloading is really important and would cut down the size of code written substantially.
Thats the only real advantage of using C++ vs C.
Everything else oop, function overloading,RAII,etc can be replaced with macros and structs.
Pretty sure you can't make destructors with macros?
Re:Why I Write Games in C (yes, C)
by FrozenVoid on Wednesday September 25, 2019 @07:44AM
(#21069759)
Is RAII in C a serious suggestion being made anywhere?
GCC has it as an extension. See the cleanup attribute:
https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attribute...