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.

Ian

-- 
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/CAOyqgcU9A%2Bb_XwOfyj%3DWu9NO%3DRfWCZYgxT51_qij%2B6SH%3Dux5Mg%40mail.gmail.com.

Reply via email to