I wonder does anyone know the reason and history of why loop labels are
styled as such:
* Labels are *unindented*.
All Go constructs, such as fields in structs indent to the right.
Why does loop labels unindented to the left?
* Labels start with capital letters.
Since all other Go identifiers start with lower case, why is loop label
an exception?
```
func foo() {
ok := true
// Why is the loop label unindented backwards to the left?
Loop:
for {
switch {
case ok:
// Why is the loop label capitalized?
break Loop
}
}
}
```
Thanks in advance to those who are ancient enough to share the story behind
loop labels.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/c2bfd4c3-4a0e-4a53-b8a7-d700543c4ef0n%40googlegroups.com.