[ prog / sol / mona ]

prog


Zig

22 2023-12-29 20:50

>>21
Well, first of all, it's huge and slow, even when performing minimal optimization. For anything but release builds, you could make a much better tradeoff between compile times and execution speed.

Furthermore, it's deeply wedded to the C/C++ memory model, because it was literally designed for that from the ground up. Yes, I said C/C++. This is the one topic where it's both correct and appropriate. That means almost every form of undefined behavior present in C or C++ also infects LLVM IR, and by extension, any language you compile via LLVM. Some of these are hard to catch in the front end.

There is plenty of room in the world for a simpler, smaller, faster backend, and some languages really need it. QBE tried and I don't think it's succeeded. Maybe Cranelift will get there. I'm not hedging my bets though.

30


VIP:

do not edit these