Comments by "" (@pierreollivier1) on "How Zig Helped Us | Prime Reacts" video.

  1.  @LeviShawando  Dude you are trying so hard to defend C, this is actually text book example of average C/Cpp dev sunken cost bias. I've worked 8/12 h a day in C for the past year, and while C is an amazingly cool language, the more time you spend writing C the more you realise it's evident flows, thinking that there is an ounce of argument in favour of C is ridiculous when Zig exists, the goal of a programmer is ultimately to write code, who cares that you've built your application in C, Zig, Rust, Javascript for that matter, the end goal of any code is to be good at what it's trying to do, and sorry to break it to you but in the light of what modern programming languages offer to the developer in terms of ease of use, simplicity, effectiveness, correctness, readability, usability. Zig even in it's early pre-production stage is light years away from the average C/cpp experience. To be semi-decent at C I had to watch probably a hundred conferences and videos about C detailing all of it's intricacies, I've read 6 books on C and advance C, I've read countless repo of big C codebase to get a feel of how good software is written in C, I've made my own version of almost all of the C std functions, I've written a C lexer/parser from scratch, a posix compliant C shell, a hand written simd library for some functions of the std, and despite all of that practice (probably around 100k lines rn) I still bang my head on the absolutely terrible ergonomic of the language, this is insufferable to waste so much time fighting the language, between all of the implicit conversion rules that you have to know and carry around when doing basically anything, the keyword semantic changing in regard to the scope, the 80 different type_t that are all typedef of 400 int's variant, the fact that you constantly have to check for NULL which isn't even a thing just a stupid macro for (void*)0, the dogshit std library, the lack of namespace, the shadowing of identifiers, the macro which are just stupid to debug, the terrible linker, and errors that just go un notice unless you use static analysis tools, the 800 compiler flags, the absolutely horrendous build system and overall tooling clunkiness, the lack of portability (despite being the "most portable language" the lack of modern tooling and standards make that "portability" very very very relative, you can only hope there is no #undef, or #define, conflicting with any of you header file or you are screwed.) The fact that enums are just integers, the lack of type safety, the lack of generic, the lack of basically everything. C is awesome to make you a better programmer not because of the fact that it's a low level system programming language, no but because to achieve any meaningful success in writing anything in C you have to go get such a wide array of knowledge and understanding of the whole bloody ecosystem and environment of the system you are working in. It's great for learning but that's it. On the other hand in less than a week I was writting Zig code, using the Zig build system, and thoroughly testing my code because unlike C in Zig they understand that to improve code quality and developer ergonomic, the language most natural way of doing thing has to also be the most correct one, it has to be the path of least resistance otherwise it's not going to be widely use. In zig I write a function and I immediately write a bunch of test because to test any code I just have to do : test "name of the test" { code running a comptime}. I don't have to create separate C files, and fight the build system to integrate nicely with my suit of test, and if mid developement I change my mind on the type of my functions / parameters, I don't have to modify and maintain 50 files just to have some working test, no I just use comptime and type inference to do that for me. There is no more hidden control flow, and implicit garbage conversion rules to remember. Easy 10x on the type safety, Easy 10x in reduce cognitive load, the tooling is already better in some areas than C will ever be, If the code compiles and run I already know it's 99% correct. This is just my opinion after a year of experience, I can't even begin to imagine how badly any C devs want Zig to become a reality. Like if you think C is fun than go try zig, there is no going back C really does pale in comparaison, and again the language is not even finished or production ready and yet it's already 10 times better than C on all fronts. Unless you are doing embedded stuff, or kernel development where zig is not supported yet, honestly there is no excuse to keep using C. edit : I'm comparing C to zig because I happen to write zig, but Those arguments are probably true, for Rust, nim and many other languages that are basically not C or Cpp.
    5
  2. 5
  3. 4