Hi All,

Question about disallowing `goto <label>` jumping over a variable declaration?

And please, before bikeshedding opinions about the use of `goto` pro or con — 
note that the Go standard library uses `goto` in some places — this question is 
purely for me to gain better understanding the choices made with the Go 
compiler.

Question. Was it:

1. Somehow logically required by the compiler, and if so can you elaborate why?

2. A design decision made, and if so what what the rationale for the design 
decision?

3. A limitation place on GoLang for some other reason, and if so, what and why?

I have prepared an example showing use of `goto` that compiles and one that 
does not at this playground URL: 

https://goplay.tools/snippet/tSAbWhmiCZK

Hoping to hear from someone who actually knows why the decision was made as 
opposed to someone who might just be guessing at the reason.

Thank you in advance.

-Mike

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/B6B94DDC-323C-4C4C-9292-903421EC7103%40newclarity.net.

Reply via email to