Here's a small, mostly meaningless, feature I'd like to see: Named/labeled scopes
Sometimes I want to create explicit scopes which have the singular purpose of having things go out of the scope so that resources are released at a particular time (tends to happen in multithreaded applications, for instance). But rather than this:
The scope name/label would be nothing more than a name/label, and could be useful in trace outputs to identify code blocks.
Is there already a way to accomplish this? (I'm explicitly looking for something that doesn't affect the output (unless the name/label is referenced within the block).
It takes this concept of a named scope and uses it to help you track what your application is doing. This is especially useful in async/threaded code where normal log statements would become interleaved or confusing.