3 ms·
> ..., comptime that is more powerful than Zig It would be great if you can elaborate more here. I can't make the conclusion from Mojo's docs now.
by tapirl 5mo ago
> ..., comptime that is more powerful than Zig
It would be great if you can elaborate more here. I can't make the conclusion from Mojo's docs now.
- melodyogonna 5mo agoNot OP, but see the entire section on metaprogramming: https://mojolang.org/nightly/docs/manual/metaprogramming/ https://mojolang.org/nightly/docs/manual/metaprogramming/. Mojo's compile-time programming is influenced by Zig, but has features that are not in Zig e.g traits, generics (real generics), and constraints, that work together.
- tapirl 5mo agoIt might be feature richer, but it is hard to say it is more powerful. Sometimes, features (especially constraints) will reduce powerlessness.
- melodyogonna 5mo agoWell, it certainly allows you to encode invariants in a more precise manner.
- totalperspectiv 5mo agoThat's fair, I think I should have just said "comparable to Zig". The type'd ness is what I was thinking of, but having actually written some zig in the last few days to play with their Io model / see what passing around an allocator is like, Zig is pretty fantastic. I still prefer the structure in Mojo, but boy do I miss if/switch as expressions.