I think the English meaning of the word "first" is unambiguous, and refers to the initial element of a sequence. Having "first" refer to the successor of the initial element is just wrong.
In cases where there might be confusion, I would say "the third element, at index 2".
The element index is pretty much language-dependent (e.g. C: 0, Lua: 1), whereas the fifth element is the fifth element, it's just the index that may be different ;)
发布评论
评论(5)
我认为“first”这个词的英文含义是明确的,指的是一个序列。让“first”指的是初始元素的后继者是错误的。
如果可能会造成混淆,我会说“第三个元素,位于索引 2”。
I think the English meaning of the word "first" is unambiguous, and refers to the initial element of a sequence. Having "first" refer to the successor of the initial element is just wrong.
In cases where there might be confusion, I would say "the third element, at index 2".
元素索引几乎依赖于语言(例如C:0,Lua:1),而第五个元素是第五个元素,它只是可能的索引不同;)
我想这个答案太分散了......
The element index is pretty much language-dependent (e.g. C: 0, Lua: 1), whereas the fifth element is the fifth element, it's just the index that may be different ;)
I guess that's way too diffuse an answer...
在某些语言中,例如 Pascal,您可以显式指定索引的范围。即
stuff[-3]
仍然是数组中的第一个元素,而不是负的第三个元素。In some languages, such as Pascal, you can specify the range of indexes explicitly. i.e.
stuff[-3]
is still the first element in the array, not the negative third.任何说“零”的人一定不会真正相信从零开始的索引。
Anyone saying 'zeroth' must not really believe in zero-based indexing.
第一个是第一个从堆栈中取出的。
The first is the one which is first taken from the stack.