Re:Index, Count, Offset, Size
by matklad on Saturday February 21, 2026 @08:37AM
(#47100722)
Ha! I also use `line_number = line_index + 1` convention!
[ Parent
| on HN ]
:-)
If it helps anyone explain the SkiFire point any better, I like to analogize it to an I-bar cursor vs. a block cursor for text entry. An I-bar is unambiguously "between characters" while a block cursor is not. So, there are questions that arise for block cursors that basically never arise for I-bar cursors. When just looking at an integer like 2 or 3, there is no cursor at all. So, we must instead rely on names/conventions/assumptions with their attendant issues.
To be clear, I liked the SkiFire explanation, but having multiple ways to describe/think about a problem is usually helpful.