Comments by "" (@pierreollivier1) on "Not All Programmers Are Good | Prime Reacts" video.
-
When compared to Zig, despite C being more “forgiving” I don’t find myself writing better code in C despite having spent the last 2 years doing 10h of C, and doing everything from scratch, like I’ve made a 3d rendering engine, in C did all my data structures myself, and on the CPU alone I was able to get a cool 200fps, took me 2 weeks to get it right, when I decided to reimplement it in Zig, it took one day to get it right, and the naive implementation was reaching 230fps, and yes I was using all the good flags for C, but the point being that even considering the fact that it’s always easier to rewrite something once you done it, I just don’t feel like C is a good language, and you don’t have that much control, in Zig it’s so easy to do SIMD, to use compiler intrinsic and communicate precise intent to the compiler. In C this sucks hard. And in C you also have to check for null pointer if you want your program to be correct so like 10% of my C code is literally:
If (!ptr)
return NULL;
So I don’t think there’s a big difference.
1