| ▲ | Index, Count, Offset, Size(tigerbeetle.com) | ||||||||||||||||||||||
| 51 points by ingve 3 days ago | 11 comments | |||||||||||||||||||||||
| ▲ | qouteall an hour ago | parent | next [-] | ||||||||||||||||||||||
With modern IDE and AI there is no need to save letters in identifier (unless too long). It should be "sizeInBytes" instead of "size". It should be "byteOffset" "elementOffset" instead of "offset". | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | wahern 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
Relatedly, a survey of array nomenclature was performed for the ISO C committee when choosing the name of the new countof operator: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3469.htm It was originally proposed as lengthof, but the results of the public poll and the ambiguity convinced the committee to choose countof, instead. | |||||||||||||||||||||||
| ▲ | dataflow 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
Is there any other example of "length" meaning "byte length", or is it just Rust just being confusing? I've never seen this elsewhere. Offset is ordinarily just a difference of two indices. In a container I don't recall seeing it implicitly refer to byte offset. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | card_zero 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
I can't read the starts of any lines, the entire page is offset about 100 pixels to the left. :) Best viewed in Lynx? | |||||||||||||||||||||||
| ▲ | zephen an hour ago | parent | prev [-] | ||||||||||||||||||||||
The invariant of index < count, of course, only works when using Djikstra's half-open indexing standard, which seems to have a few very vocal detractors. | |||||||||||||||||||||||
| |||||||||||||||||||||||