You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't a bug per se, but it's a bit confusing for someone learning Go (like myself).
In the Go tutorial, the sort package is introduced and the sort.IntArray type is
mentioned. But this type isn't an int array, it's an int slice. I found the concepts of
slices to be a bit confusing at first, and this aggravated my confusion somewhat.
Similarly, the tutorial creates a type dayArray, which is a struct that contains a slice
of pointers.
Is there any interest in renaming these types to IntSlice and daySlice? I think it would
help. Or, it would be helpful if the tutorial explicitly said, "sort.IntArray is
actually a slice".
Thanks!
The text was updated successfully, but these errors were encountered:
by jeremy.f.stephens:
The text was updated successfully, but these errors were encountered: