r/linux • u/rastermon • Aug 16 '14
Yet another C object model
https://phab.enlightenment.org/phame/live/1//post/yet_another_c_object_model_but_better/
56
Upvotes
r/linux • u/rastermon • Aug 16 '14
View all comments
Show parent comment
4
u/[deleted] Aug 16 '14
You barbaric...
...bastard. It's been decided. We fight. 1vs1. Quake 3 DM. 15 min/15 kills. Random map. Name the time, the server and I'll be there.
Arrays should be only a simple, virtually uniform region of memory, filled with nothing but what you put in them, every sizeof(variable). Want to get a member != to the first? Offset array start pointer by n*sizeof(variable).
Suspect you go over the bounds? Print the index somehow. Otherwise wait for a segfault. GDB that stuff and fix your problem by making sure it won't happen. Doing a check every single time you access an array is absolutely not something I want my CPU cycles spent on. You learn to ride a bike by crashing, damnit.