| ▲ | WalterBright 3 hours ago |
| I try to minimize use of destructors for the same reason. |
|
| ▲ | andrepd 2 hours ago | parent [-] |
| Destructors run predictably at list, and are pervasive everywhere. You know that when you exit a scope, be that a function or whatever it may, the destructors of variables in that scope are called. That is clear and consistent. The transformation mentioned above is not. |
| |
| ▲ | WalterBright 2 hours ago | parent [-] | | Understanding the code requires understanding the destructors of the objects you're using. Since they are invisibly inserted, they are a source difficulty in entirely understanding the code. | | |
| ▲ | rcxdude an hour ago | parent [-] | | I do wonder if any of the language servers that insert implied type annotations would ever also show things like destructor calls in a similar manner. It seems like it would be quite useful. |
|
|