Zig heading toward a self-hosting compiler
Zig heading toward a self-hosting compiler
Posted Oct 8, 2020 23:43 UTC (Thu) by khim (subscriber, #9252)In reply to: Zig heading toward a self-hosting compiler by mathstuf
Parent article: Zig heading toward a self-hosting compiler
> I wouldn't call them comparable.
What's the difference? Both mean that you need to abandon basically all the codebase collection for a given language and start more-or-less from scratch.
> You certainly can't add any given feature to a language (without basically telling everyone to go and rewrite their code)
You certainly could. Rust does it all the time. C++ does it less frequently. Heck, even C does that. You couldn't remove — that's different.
> Here's a list of crates which support modes of being compiled without the standard library: https://lib.rs/no-std
About what I expected. 492 crates out of 48,264. And, most likely, mostly on simplistic side.
So, basically, literally 99% of codebase becomes unavailable for you if you want to handle OOM… at this point it's not materially different from switching to a new language… even if it would be 50-70 times less popular than Rust… you would have more choices for you to pick.
Posted Oct 9, 2020 7:49 UTC (Fri)
by laarmen (subscriber, #63948)
[Link]
Posted Oct 9, 2020 13:11 UTC (Fri)
by mathstuf (subscriber, #69389)
[Link]
Having an allocation-failure-resilient standard library wouldn't require me to rewrite code using the current standard library. Certainly not with Rust's stability guarantees.
> You certainly could. Rust does it all the time. C++ does it less frequently. Heck, even C does that. You couldn't remove — that's different.
I said *any*. Sure, specific features get added all the time. Others get rejected all the time (even if they'd be nice to have) because they'd disrupt way too much.
> About what I expected. 492 crates out of 48,264. And, most likely, mostly on simplistic side.
You have to balance this against the interest involved here. There's enough to build *something* at least. Where that line is? Not sure, but it's almost certainly not at a level that is effectively useless.
Zig heading toward a self-hosting compiler
Zig heading toward a self-hosting compiler
