Erik Engheim
2 min readDec 28, 2020

--

If one meant literally scanning all code repositories on the planet and replacing all the C code with Zig, then that would indeed be dumb.

But this is about providing alternative and better tools for things C as traditionally done well.

That is a process that has been ongoing for decades and isn't dumb at all. Two of the first "replacements" for C was C++ and Objective-C. They replaced a subset of what C was used for.

Go is another language which has replaced a subset of C and C++ usage.

For somebody programming on the Mac, Swift replaces most of the C usage in Apple libraries.

But there are always new areas one can find where a better language can replace something C have tended to dominate.

Microcontroller programming is one area e.g. where C has long held a kind of obvious advantage as you need low level control and small binaries. E.g. Go doesn't give enough low level control nor does it gives small binaries.

Zig does that. I am pretty sure next time I do some microcontroller programming I will not be doing it with C. I will be using Zig, and I know I am not alone. There are already people who have tried this and found Zig to be a better language for micro controller programming.

Does this mean C will be replaced in every possible instance. Of course not. But I don't see any particular value in C holding out for all long as possible. It is a pretty outdated language, which has been kept alive due to decades of momentum.

--

--

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