3 ms·
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
by im3w1l 2y ago
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?