Programming Language Design: Private Scopes
Current mainstream programming languages don't provide means of grouping code within a single function or method. Often, a function can end up being quite long even when its only doing a single task. The task itself can be complex requiring several steps and calculations but still logically be a single task. Traditional wisdom states that long functions should be broken up into separate smaller functions, but this scatters logic and becomes hard to follow. We need a facility for grouping and encapsulating code within a function. It should group logic together and be easy to comprehend.