Go is fucking retarded.
Let's look at the code to check if a list contains an item.
Java:
myList.contains("My string");
Python:
'My string' in my_list
Go:
func contains(s []int, e int) bool {
for _, a := range s {
if a == e {
return true
}
}
return false
}
and repeated for every type you want to use it for
>b-but performance!!
Since the convenience battle is already lost we might as well compete on speed, eh?
reverse-complement
Go 0.48
C gcc 0.42
pidigits
Go 2.04
C gcc 1.73
regex-dna
Go 3.28
C gcc 2.43
fasta
Go 1.98
C gcc 1.36
fannkuch-redux
Go 15.84
C gcc 9.07
spectral-norm
Go 3.95
C gcc 1.98
n-body
Go 21.52
C gcc 9.56
k-nucleotide
Go 17.36
C gcc 6.46
mandelbrot
Go 5.64
C gcc 1.64
binary-trees
Go 39.68
C gcc 3.28
>O-oh, but what about C++?
reverse-complement
Go 0.48
C++ g++ 0.59
regex-dna
Go 3.28
C++ g++ 3.89
mandelbrot
Go 5.64
C++ g++ 5.82
pidigits
Go 2.04
C++ g++ 1.89
fannkuch-redux
Go 15.84
C++ g++ 13.17
fasta
Go 1.98
C++ g++ 1.47
spectral-norm
Go 3.95
C++ g++ 2.01
n-body
Go 21.52
C++ g++9.30
k-nucleotide
Go 17.36
C++ g++ 7.15
binary-trees
Go 39.68
C++ g++ 7.23
Wow, it actually won! on 3/10 tests and by microseconds each time.
Also, the binaries are fuck huge (2MB for fucking hello world, C version is 10KB).
There is literally NO reason to use this pile of garbage. Do yourself a favor and use something that can actually compete, like Rust.