← Back to context

Comment by Mawr

14 hours ago

> Zig, Rust, and the likes are only viable in niches where C is viable

Pretty much correct, yes.

> Zig will become THE C replacement and that will let me iterate at the speed of JS or Python with performance of C or Rust.

Fundamentally impossible. C/Zig/Rust have 100% performance as a top goal, which has to be traded off with something else and that's always realistically going to be programmer work/effort/time.

You can't have a house built 100% fast but also 100% cheap and with 100% quality. At best you could cleverly abuse the law of diminishing returns and aim for ~80% in all three areas. That's basically what Go's trying to do.

> once this linker and incremental compilation on other targets land,

In any case, why would a better linker and faster compile times of all things achieve this supposed goal?

Beyond being low level, Zig is still pretty memory unsafe and has you make choices about each allocation, making it unappealing as an applications language. Zig and Python are completely different worlds.

> At best you could cleverly abuse the law of diminishing returns and aim for ~80% in all three areas. That's basically what Go's trying to do.

then how does Zig achieve ~90%?

> In any case, why would a better linker and faster compile times of all things achieve this supposed goal?

sub-100ms rebuild is actually more important as the project grows. when you iterate, you think differently. picking different colors or fonts or whatnot becomes much cheaper, so you are more willing to try

> You can't have a house built 100% fast but also 100% cheap and with 100% quality.

That’s essentially what technological development does, is make those tradeoffs more favorable.

  • No? The conventional engineering wisdom has always been: pick two out of fast, cheap, or good.

    And technological improvements don't remove these tradeoffs. You still have to balance tradeoffs. The best thing you could do is have a mix of technologies that choose different tradeoffs. A single technology (zig) won't do.