Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
z3phyr
on Sept 21, 2019
|
parent
|
context
|
favorite
| on:
Why I Write Games in C (yes, C)
If C gets operator overloading and RAII, there will be no good reason to use C++ for me!!
FrozenVoid
on Sept 23, 2019
|
next
[–]
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.
pingyong
on Sept 23, 2019
|
parent
|
next
[–]
Pretty sure you can't make destructors with macros?
FrozenVoid
on Sept 25, 2019
|
root
|
parent
|
next
[–]
https://en.wikipedia.org/wiki/Resource_acquisition_is_initia...
sramsay
on Sept 21, 2019
|
prev
[–]
Is RAII in C a serious suggestion being made anywhere?
kazinator
on Sept 21, 2019
|
parent
|
next
[–]
GCC has it as an extension. See the cleanup attribute:
https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attribute...
ncmncm
on Sept 22, 2019
|
parent
|
prev
[–]
It is meaningless without destructors and exceptions.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: