8 ms·
> The way you know it's magic is it shatters the principle of referential identity, which tells you that a variable is itself When you do a useValue() it is cl
by zero_shift 1y ago
> The way you know it's magic is it shatters the principle of referential identity, which tells you that a variable is itself
When you do a useValue() it is clear you are grasping at something with a larger lifespan than your function.
Conceptually it is not much different than
int counter() {
static int x = 1;
return x++;
}
Which predates C89, if age is an argument