Would you say that Go is not excessively verbose in non-trivial use cases ? I recently had to sort a struct list in a program. Added lines of code for sorting a single list once : 30. What the ...
fileBytes, _ := ioutil.ReadAll(<file>)
text := string(bytes.Join(bytes.Split(fileBytes, '\n')))
fmt.Println(text)
> Added lines of code for sorting a single list once : 30. What the ...Sorting requires implementing three methods, at least one of which is usually given to you for free (Len). A simple case will usually cost about 9 lines of neatly formatted code, 3 if you're not so neat (which the Go sort library does itself).
func (sl structSlice) Len() int { return len(sl) }
func (sl structSlice) Less(i, j int) bool { return sl[i].MyKey < sl[j].MyKey }
func (sl structSlice) Swap(i, j int) { return sl[i], sl[j] = sl[j], sl[i] }
Ultimately, even this isn't a case of verbosity so much as it is not abstracting away the basic sorting functions.