On Tue, May 3, 2022 at 11:13 PM Jan Mercl <0xj...@gmail.com> wrote:
>
> On Wed, May 4, 2022 at 4:27 AM Ian Lance Taylor <i...@golang.org> wrote:
>
> > In saying this I don't at all claim that Go is perfect.  There are
> > places where we made mistakes.
>
> May I please ask you to share what you personally consider a mistake
> and, if possible, what would you change if you can, say, travel back
> in time?

I can only give some personal opinions.  Others will disagree.  And my
opinions change over time, and could well be mistaken.

I think that deciding that := declares a single variable in a
for/range statement was a mistake (https://go.dev/issue/20733).

I think that naked return statements in functions with named result
parameters was a mistake (but named result parameters in themselves
are useful).

I think that ranging over strings may have been a mistake.  I go back
and forth on that.

I think that wrapping on integer overflow was a mistake (it should panic).

I think that making "var i = 1 / 0" a compile-time error was a
mistake.  Similarly for `"abc"[3]`.

Let's not even get started on the standard library.

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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXuE%2B3w8J4X0L_OyeVm%2B59VNCOLDQ2TouwaZWUoBS-dGQ%40mail.gmail.com.

Reply via email to