When I was first learning Go, I was interested most in the features it had that other languages did not. For example, it has a special keyword called iota
. Now Iota is the letter "I" in the Greek alphabet. But in Go it is an incremented value in a const
block.
At best, iota
is a small convenience so that developers do not need to type out 0, 1, 2, and further numbers. But that is all it is good for. It does not provide any useful functionality that cannot be duplicated easily just by using some integers.
I suppose iota
could:
In the Go programs I have written, I don't think I have ever bothered with iota
. Basically getting a running and correct program has always been more important than using a shortcut for a number sequence. My end conclusion is that iota
probably does not add much value, and having a simpler language might be better than having iota
.