As title, what's the full name for iota
(not the usage) in golang:
const ( // iota is reset to 0
c0 = iota // c0 == 0
c1 = iota // c1 == 1
c2 = iota // c2 == 2
)
As title, what's the full name for iota
(not the usage) in golang:
const ( // iota is reset to 0
c0 = iota // c0 == 0
c1 = iota // c1 == 1
c2 = iota // c2 == 2
)
That's the full name by itself. "iota" is the letter of the Greek alphabet. It is typical for the math notations:
You can find it in other programming languages as well (see iota in Scheme).
iota
of std::iota
stand for? –
Anthropomorphize I think the key point is that iota
means the smallest letter of the Greek alphabet, the same meaning as 0
being the smallest value of an enum type.
Quoted from Wiki:
Etymology
From Ancient Greek ἰῶτα (iôta).
(jot): In reference to a phrase in the New Testament: "until heaven and earth pass away, not an iota, not a dot, will pass from the Law" (Mt 5:18), iota being the smallest letter of the Greek alphabet.
iota is not an acronym for something but a word
As others pointed out it is the 9th letter of the Greek alphabet however in english it is also a word with a definition reflective of the Greek letter.
From https://www.vocabulary.com/dictionary/iota
If you don't care one iota about something, it means you don’t care about it even one little bit. An iota is something very small.
From https://www.merriam-webster.com/dictionary/iota
an infinitesimal amount : JOT
did not show an iota of interest
If you think of how it is used in Go (golang) that definition fits perfectly, as you are assigning values to constants just to give each constant a unique value so it can be used as a constant. Most often you do not really care what the value is so long as it is unique among that collection of constants
From http://www.randomprogramming.com/2014/07/algorithms-in-action-iota-and-shuffle/
The Greek letter iota is used in the programming language APL to generate a sequence of consecutive integers.
iota also exists in c++, So there are existing usages in other languages that are similar to Go.
To be simple, it's just a Greek letter, equivalent to English letter "I", but pronounced as "iota", similar to "A" as "alpha".
© 2022 - 2024 — McMap. All rights reserved.
iota
. – Nora