I donβt think this is completely the Swift / Xcode thing, since I saw it in other languages ββand in the IDE.
Why is the βcaseβ inside the switch statement negative indented (I'm not sure if this is the correct way to formulate)?
I would expect the Switch statement to look something like this.
switch(type) { case 1: // do something break; case 2: // do something else break; default: // default break; }
But Xcode insists on it
switch(type) { case 1: // do something break; case 2: // do something else break; default: // default break; }
Is this a mistake, or is there a reason for this? If so, then what is it? This is what has been listening to me for quite some time.
source share