by steveklabnik · 6y ago · 0 comments
This is well-defined, as being dropped in the order that they are declared.
Yeah, the fact that it's the opposite in C++ was a huge point of contention before we defined it; changing what was there risked breaking a lot of code, and there are good reasons for either order. But yeah, I had to go and look at the RFC for exactly the reasons you state; it just isn't normal to care about this at all, so it's easy to not remember.
Don't you just define a destructor[1] and make it explicit? Or maybe I'm missing something subtle here?