4 ms·
Wow I'm actually pretty blown away! I use Go on a daily basis and have never seen it used anywhere or had any clue it was in the language. If you had asked me
by ladberg 5y ago
Wow I'm actually pretty blown away! I use Go on a daily basis and have never seen it used anywhere or had any clue it was in the language.
If you had asked me a few minutes ago if Go had goto I would have said "definitely not and they would never add it because it goes against the Go ethos".
- umanwizard 5y agoWhy does it go against the Go ethos? (Asking out of curiosity. I’ve never used the language.)
- ladberg 5y agoI feel like they usually prioritize simplicity and readability instead of tricks, syntactic sugar, and one-liners. For example there's no ternary operator. Instead you'll have to write out a few lines of if/else. There's no function overloading or operator overloading, no built in min/max, and currently no generics (though they're being added). They definitely try to keep the number of keywords down to a minimum compared to languages like Swift where you could write the same business logic in fewer lines using stuff like try, guard, !, and ?.
- withinboredom 5y agoAn if-statement is essentially sugar for conditional jump which is sugar for compare then jump. Goto is a jump. It’s all sugar.
- selcuka 5y agoThe name of the language should have given it away.
- robertlagrant 5y agoHopefully Go 2 won't have Goto