> But it appears that math.huge as argument also raises this error.
> IMO, the following use cases should be considered as being valid:
> string.sub("abc", 2, math.huge)
> string.sub("abc", -math.huge, -2)
> Yes, I know we could use -1 and 1 values respectively to get the same results,
> but infinite values are suitable for the semantic of the function.
I just felt uneasy using infinity as end-point ...
Especially bad if the infinity value is hidden behind a variable.
What is gain by not using 1 for first location, -1 for last ?