> On Mar 19, 2025, at 1:55 PM, Ian Lance Taylor <i...@golang.org> wrote: > > On Wed, Mar 19, 2025 at 10:43 AM Mike Schinkel <m...@newclarity.net> wrote: >> >> Given these benchmark results, would the Go team reconsider such a language >> feature on a basis of performance vs. a comparison of syntax to bring if >> statement performance closer to that of switch statements? The current >> disparity means developers must choose between the awkward single-case >> syntax of switch statements and the more natural control flow of if >> statements, often sacrificing either readability or performance. >> >> I understand Go's philosophy of keeping the language small and orthogonal, >> but this seems like a case where a targeted language feature could improve >> performance for use-cases that needs it, or at least make the gaining that >> performance much less awkward. > > It's very unusual for Go to adopt language changes for performance > reasons. In fact, nothing comes to mind. Language changes are made to > improve expressibility and readability. Where performance is > important, we prefer to address it using tooling or library functions.
Okay, thank you for considering and replying. -Mike P.S. The proposed change would improve expressibility and readability too, but I digress. -- 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 visit https://groups.google.com/d/msgid/golang-nuts/87033509-CD21-4C98-A4F7-8C18F76ADFF5%40newclarity.net.