What are some pros and cons of a scope
keyword?
What are some pros and cons of a scope
keyword?
In something like C++ you could create a scope like so:
cpp
{ // Do something neat here }
I was wondering about having or maybe even requiring a scope
keyword, which might look like this:
cpp
scope { // Do something neat here }
This seems even more relevant in an indentation sensitive language like python:
py
scope: pass
Interested to hear any opinions, TIA.
A scope is already implied by brackets. For example, a namespace, class, method, if block are also scopes.
So I don't really see why you'd want an explicit scope keyword inside methods, when all other scopes are implied... That just creates an inconsistency with the other implied scopes