Carbon values, variables, and pointers
13 points by matklad
13 points by matklad
Context: I find this fascinating as it's a pretty deep exploration of a thorny language design problem in systems programming space: how to make sure that a generic function like fn f<T>(x: T) uses optimal ABI for passing x in, depending on T and the target ISA, without creating semantic foot guns like hidden aliasing
Related:
At one point I tried reading about what Mojo does ...
https://docs.modular.com/mojo/manual/values/
But I got lost, and I think it's still in flux
Mojo is influenced by Rust and Zig (and Swift and C++ probably)