Replying to @dude_the_builder and @slonik-az.
The ideia is for PRO to be completely transparent to the user. Zig’s goal is for us to pass by value as a default. You should never need to think about how the compiler decided to actually pass the parameter behind the scenes, always assume that it passed by value. In fact, we shouldn’t even need to know that the compiler is doing this optimization. The only thing you would need to know is that passing by value won’t cause performance problems. In fact, it should have better performance.
Clearly, this isn’t working, but it’s a flaw in the implementation, not in the idea itself. In the other post in this forum, I argued that I thought the implementation problems were unsolvable, but you might have seen Andrew’s reply. He has not given up.
When (or if, with Andrew’s pardon ) Zig achieves its goal, than parameter passing in Zig will be much simpler than C. Just pass by value, period. Only pass pointers if you actually really need the address.