Re:Simple Ways of Reducing the Cognitive Load in Code
by majewsky on Wednesday June 29, 2016 @04:34AM
(#12000276)
I also use naked scope blocks sometimes. To me, their main purpose is to make temporary variables go out of scope, to clarify which variables are still intentionally live beyond the block.
I do occasionally use scope blocks when I want to constrain the scope of one or more local variables, and there isn't an otherwise appropriate scope already created by a flow control construct.