The web-based code converter, Xcode Extension, and the AppCode plugin support the auto-detection of the input scope.
How did the auto-detection of input scope work?
In the previous versions, if the code contained a clear method declaration, then the scope auto-detection algorithm detects a local scope for the code snippet.
When a local scope is detected, the converter makes the following changes:
- The non-mutating Objective-C variables are converted to 'let' and the ones whose value changes are converted to 'var'.
- The variables or constants are not initialized with default values. 
If a clear function declaration cannot be found in the code snippet then the input scope defaults to the global scope.
When a global scope is detected, the converter makes the following changes:
- All the Objective-C variables are converted to 'var'.
- All the constants and variables are initialized with default values.
What has changed?
Previously the default convention was that if the scope of the code snippet could not be ascertained, then the global scope was considered the default scope.
Now, the default scope is the local scope.
Original Objective-C Code:
Converted Swift code for the latest version:
Converted Swift code for older versions:
This would improve the code conversion through the Convert Selection command from Xcode extension, AppCode extension, and the web-based converter.
As most of the code conversion requests through these have a local scope rather than a global scope.
 In certain cases such as these, the nullable local variables are initialized with nil.