3 ms·
> Like, if you just were to given a task to write a compiler, would you honestly choose Zig? No. Actually, yes. A compiler is not just a dumb filter that eats
by rollcat 4y ago
> Like, if you just were to given a task to write a compiler, would you honestly choose Zig? No.
Actually, yes.
A compiler is not just a dumb filter that eats text and spits out machine code. It can provide infrastructure to other tools (like linters, analyzers, LSP servers...), and even allow importing and using parts of it in user programs.
Some of this can't be done in a different language (like Haskell) without some very crazy FFI, and might add an extra runtime dependency for those tools, which might not always be desirable.
- peatfreak 4y agoThank you for this comment, I only wish it was at a higher level up in this thread. The number of ignorant comments in this thread is astounding. All this criticism feels like it was written by back-seat drivers who have no clue about the complexities of language design or compiler implementation.