2 ms·
I see you're a fan of Zig's design, but I don't really think Rust would be as you describe even if it was made today, for several reasons: - comptime evaluatio
by littlestymaar 6y ago
I see you're a fan of Zig's design, but I don't really think Rust would be as you describe even if it was made today, for several reasons:
- comptime evaluation aren't something Rust designers are interested in, as it doesn't fit their functional programming mindset[1], (and it's not a new concept to Zig, D has had something similar for long).
- An IDE-first compiler is a good idea (and a must have for a production language today) but I'm not sure how feasible it is to start with something like that. If it's going to slow down early development, then it's definitely not a good move to go there first, but I don't know.
- per function allocation is a pain in the ass from a usability perspective. In fact it recreates the same “function color” problem you'd like to avoid. Just think of your non-allocating functions as blue and allocating ones as red functions, you can't call a red function from a blue one.
- Zig's “colorblind” asynchronous function rely on automagically switching between async and sync functionn at compile-time, and I really don't see that fitting with Rust's thrive for explicitness.
[1]: https://twitter.com/pcwalton/status/1369114008045772804 https://twitter.com/pcwalton/status/1369114008045772804
- roca 6y agorust-analyzer is remarkably good. I am curious as to how Zig comptime is going to interact with IDE features.