【发布时间】:2020-12-23 03:35:49
【问题描述】:
作为标题,golang中iota的全名是什么(不是用法):
const ( // iota is reset to 0
c0 = iota // c0 == 0
c1 = iota // c1 == 1
c2 = iota // c2 == 2
)
【问题讨论】:
-
全名是什么意思?它只是写成
iota。 -
我会说“iota”的全名是“预先声明的标识符 iota”;)(请参阅此处:golang.org/ref/spec#Iota),但我不确定我是否正确理解了这个问题。 .
-
@rob74 我个人会称它为“自增常数”,但正式名称仍然是iota。
-
这能回答你的问题吗? What does iota of std::iota stand for?
标签: go terminology iota