2 ms·
C has an enormous weight to it. If you've been carrying it for decades, you are likely somewhere between being so used to carrying it it's hard to notice the b
by Laremere 4y ago
C has an enormous weight to it. If you've been carrying it for decades, you are likely somewhere between being so used to carrying it it's hard to notice the burden, and being so at ease with carrying it that it's not actually a burden. Imo, Zig doesn't have /a/ killer feature. Instead it has hundreds of small design choices made with the insight of decades of programing language evolution, along with a few clever ideas on its own.
I would say it's well on the way to becoming the best language for giving you control as a programmer over the computer. Compared to say Rust focusing on safety first, execution speed second, ergonomics third; Or Go on maintainable systems at large corp scale.
To list some specific examples:
- No headers.
- No complex build and linkage systems.
- Fast compilation (and no explosion of compile time as headers import headers.)
- A small and distinct set of fundamental types, with true enums, unions, and arbitrary size integers.
- Code formatting, which is a feature that feels kind of invisible, but means arbitrary code you look at will be formatted in a familiar way. A subtle but powerful difference.
- It doesn't try to remove undefined behavior. Instead it does a really good job of catching you hitting it when building in a development version. Imo, often code wrote simply will have undefined behavior that is meaningless because it will never be called with that behavior. It's fine to code that way in C until you accidentally hit it and have a hell of a time figuring out why something isn't working.