Re:Why I Write Games in C (yes, C)
by seamyb88 on Saturday September 21, 2019 @06:49PM
(#21038375)
So which feature can you not implement? The only I can think of which you'd have real problems are anonymous functions/lambdas. Most other features I think you can implement. It won't look the same, but it will serve the same purpose.
[ Parent
| on HN ]
Re:Why I Write Games in C (yes, C)
by johannes1234321 on Saturday September 21, 2019 @08:56PM
(#21038931)
Things coming to mind:
Pointers which can't be NULL (aka. references)
Exceptions which also clean up intermediate frames (the exception itself can be done with longjmp, but no destructors which could be run)
Pointers that can't be null are usually implemented by struct embedding. That's typical for Linux kernel code, for example.
Destructors. It is the defining feature of the language; everything else in the language extends their reach. They are the key to full exercise of code paths, and thus reliable code.
A programmer who makes full use of destructors is simply a better programmer than one who doesn't.