Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
kazinator
on Sept 21, 2019
|
parent
|
context
|
favorite
| on:
Why I Write Games in C (yes, C)
C++ RAII is completely gone without the use of classes; it requires something with a destructor.
vnorilo
on Sept 22, 2019
[–]
I guess the OP means pod types (plain Cish structs) where dtors are implicit.
AnimalMuppet
on Sept 22, 2019
|
parent
[–]
But then what's left of RAII? What resource is there to allocate other than the memory itself? RAII means more than just "get memory to put this in".
vnorilo
on Sept 22, 2019
|
root
|
parent
[–]
Presuming GP includes unique_ptr, there's no real loss of RAII. In my opinion you might as well write trivial classes, but hey, to each his own.
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: