4 ms·
That implementation is wrong in multiple ways. First of all, it should return the pre-increment value. Second, it doesn't actually increment your variable (yo
by valleyer 10y ago
That implementation is wrong in multiple ways. First of all, it should return the pre-increment value. Second, it doesn't actually increment your variable (you need to use an `inout` parameter for that).
Perhaps this demonstrates perfectly why it's being removed!
- coupdejarnac 10y agoYes, indeed. I wrote this somewhat as a joke, and I hope nobody would actually do this in production.