If I do that, I might just as well do
// Make this function as local as you wish (even lambda). mapping get_my_globals() { mapping m=master()->resolv("Mirar's globals"); if (m) return m; m=(["myclass_instances":0]); add_constant("Mirar's globals",m); return m; }
class TopClass { class MyClass { int my_instance_number=get_my_globals()->myclass_instances++;
... }
object the() { return MyClass(); } }
if I'm going to clutter namespaces outside the interesting scope, anyway. And I can do that without static. I like static because it solves the problem in a /nice/ way, so lets leave it open to solve all instances of the same problem?