6 ms·
Rust is an example of "compiler magic" in this case. You're right about Zig, and reading the source [1] I'm still kind of impressed how unified they made compt
by notmywalrus 1y ago
Rust is an example of "compiler magic" in this case.
You're right about Zig, and reading the source [1] I'm still kind of impressed how unified they made comptime / runtime.
[1]: https://github.com/ziglang/zig/blob/32a1aabff78234b428234189ee1093fb65f85fa3/lib/std/Io/Writer.zig#L536 https://github.com/ziglang/zig/blob/32a1aabff78234b428234189...
- int_19h 1y ago"Compiler magic" is generally used to describe things that are built into the compiler; I don't see why macros would qualify. And if they do, then why wouldn't template metaprogramming?