This:
class TopClass { class MyClass { static(global) instances=0; int my_instance_number=instances++;
... }
object the() { return MyClass(); } }
TopClass top1=TopClass(); TopClass top2=TopClass();
top1->the()->my_instance_number == 0 top2->the()->my_instance_number == 1 top1->the()->my_instance_number == 2
without a top-global counter, you would get
top1->the()->my_instance_number == 0 top2->the()->my_instance_number == 0 top1->the()->my_instance_number == 1
which sometimes is something that you *want* as well.
I like static. It's a namespace saver. I don't think it's confusing at all, and it has it's uses. Just like ?: and ,.