Erik Engheim
Jul 28, 2021

--

C is by no means perfect, and it is becoming a major security liability. So many vulnurabilities in modern software today can be traced back to C code.

Why use lint, if I can use Zig or Go?

Plenty of languages let you affect how bit are layed out in memory. You can do that in Zig. Hence I am talking about it as a C replacement.

C++ didn't get rid of C macros, so your example is poor.

Zig isn't a C dialect. It is a language which is binary compatible with C, not source code compatible. That is significant difference.

Sure it is neat with some of these hacking tricks in C, but maintainable and high performance code isn't built with neat little hacks like this.

And plenty of languages can produce less machine code for various real world problems than C.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

No responses yet