5 ms·
Intersting, some follow up questions: - Fast compilation: isn't it llvm? So how faster compared to C++/Rust/others that use it? - Ownership rules/ECS: what ab
by collegeburner 5y ago
Intersting, some follow up questions:
- Fast compilation: isn't it llvm? So how faster compared to C++/Rust/others that use it?
- Ownership rules/ECS: what about zig makes this especially good? The only language that comes to mind in this respect is Rust and its borrow checker, is it similar in Zig?
- runevault 5y agoPart of Rust's problem last I knew was it throws a lot more than it necessarily has to at the LLVM backend. So a front end that takes the time to lessen the burden could run faster despite using the same tooling.
- actuallyalys 5y agoPart of it (perhaps the majority) is excessive intermediate code. But at least some of it is that Rust's abstractions are more complex/involved. The "zero cost" doesn't refer to compilation time.
- runevault 5y agoIs that part paid in the Rust or LLVM portion of the compiler chain?
- dnautics 5y agorust portion. For example, LLVM has no internal concept of ownership.
- actuallyalys 5y agoThat's true of borrowing, but I'm not sure if it's true for other abstractions. I imagine generics (due to monomorphization) adds to the burden on the LLVM side.
- dnautics 5y ago1. Both zig and rust compile to intermediate representations which are then compiled to llvm IR. Most of the compilation woes of rust are in the early stage IR. 2. Zig doesn't have ownership rules, which can get in the way of important data structures for gaming.
- deleted 5y ago[deleted]