7 ms·
How about instead of RAII built into the compiler, you define destructor functions for each datatypes that you care to and have a sidecar or compiler plugin or
by throwawaymaths 2y ago
How about instead of RAII built into the compiler, you define destructor functions for each datatypes that you care to and have a sidecar or compiler plugin or hell even a linter check that those destructors have been called when a variable of that type goes out of scope?
If you miss a destructor event, without configuring the addon "yes I really meant that", the addon halts the compilatoin at best, or returns nonzero for ci at worst.
- paulddraper 2y agoAnd then what if you combined the compiler+linter together.
- throwawaymaths 2y agoSure, as long as you don't put it in the type system.
- uecker 2y agoThis would also be my preferred solution.