|
|
|
|
|
by samatman
1392 days ago
|
|
This is the bane of my existence working with Lua. Iterating an array or adding to the end are fine, we have ipairs and insert for that, but ranges on strings I'm constantly having to think harder and write more code than necessary. I love the language, wouldn't trade it for another, but the 1-based indexing on strings, which represents an empty string at position 3 as (3,2), it's egregious. Not as egregious as a dynamic language where 0 is false though. |
|
well, C also considers 0 being false (and you can argue that C is "dynamic"!).