3 ms·
Im relatively new to C and I struggle to understand why C std lib sucks so hard Why ppl need to write such a fundamental stuff like this? >void *vec_safe_at
by hardware2win 3y ago
Im relatively new to C and I struggle to understand why C std lib sucks so hard
Why ppl need to write such a fundamental stuff like this?
>void *vec_safe_at
>return (t_index >= vec_length(self)) ? NULL : vec_at(self, t_index);
Ehh, sadly we dont have generics in C and some improvements over NULL oriented programming
- keikobadthebad 3y agoIt's 50+ years old, it's amazing it's still so relevant and effective.
- hardware2win 3y agoI disagree It is just small, but not amazing and effective. Debugging index out of bound issues that could have been easily prevented sucks and wastes a lot of time