5 ms·
> appears to be the #1 issue for every person out there allergic to Lua It isn't. Having worked with languages that have both 0- and 1-based indexing (sometim
by jstx1 3y ago
> appears to be the #1 issue for every person out there allergic to Lua
It isn't.
Having worked with languages that have both 0- and 1-based indexing (sometimes at the same time), this is at the bottom of my concerns when evaluating a language. It's the "tabs vs spaces" of programming language comparison. Right there with "does it have semicolons" and "is whitespace significant". None of these things are important.
- Solvency 3y agoAre you allergic to Lua? If so, then what is the primary reason? If you're not allergic to Lua, then you're not who I'm referring to. Because if you search HN, the 1-base issue comes up disproportionately higher than any other sentiment, good or bad.
- jurimasa 3y agoIf they can't overcome such a simple thing, it's just not for them.
- giraffe_lady 3y agoI'm not the person you asked but. I've used lua professionally, it's one of my least favorite languages to work in, and I don't give a shit at all about 0 vs 1 index.
- lcnPylGDnU4H9OF 3y agoMy understanding is that the difference between 0-indexing and 1-indexing manifests in algorithms which iterate over a list. If the start of a list is at index 0, the end is at index "length - 1" and if the start of a list is at index 1, the end is at index "length". Neither fundamentally changes such algorithms. That's why it's so low on the list of importance when considering language features; it doesn't fundamentally change what the language does or how it's organized (perhaps beyond some contrived examples) and instead only affects what the code looks like.