▲ | fanf2 7 months ago | |||||||||||||||||||||||||||||||
C, C++, Rust, Zig, … | ||||||||||||||||||||||||||||||||
▲ | im3w1l 7 months ago | parent | next [-] | |||||||||||||||||||||||||||||||
I'm not sure about Zig, but what strikes me about the others are that they change the type of the object. T vs T*. It would be kind of neat if you could have an annotation on the variable instead that didn't change the type. You could in C++ make a reference T& which is almost that - references behave identically to the real thing. But I think freeing the memory backing a reference is probably quite questionable? | ||||||||||||||||||||||||||||||||
▲ | eikenberry 7 months ago | parent | prev [-] | |||||||||||||||||||||||||||||||
What's Zig's notation for it? | ||||||||||||||||||||||||||||||||
|