TerminX, on 15 January 2014 - 05:58 PM, said:
I think having those be one-based is weird. What's the point of breaking from the established functionality and operation here? It seems like you're going out of your way to make a programming language seem less like a programming language and the result is merely another sticking point on the list of differences between Lunatic and CON. Why? I mean, we aren't shifting all the tile numbers up by one and calling tile 0 tile 1 because logically it's the "first" tile...
There are some diffences between volume/level numbers and tile numbers. The former are usually (but not always) referred to using one as the base, as in "E1L1", while
tile numberstiles are always unambiguously numbered. The thing is, if you're dealing with CON directives/commands that take the former, there are already inconsistencies, for example:
definelevelname takes a 0-based episode index,
music takes it 1-based. This already
leads to confusion -- so scripting coders have to know which base a particular command uses anyway in the case of volume numbers.
I don't think such "cosmetic" tweaks make Lunatic more or less of a programming language. Look at it that way: if the tweak allows users to write shorter and/or clearer code, I consider it a good one. With E/L numbers, I guess that the two major use cases are 1) retrieving them for sticking them into another command (like the one getting the name of the current level, no difference in user code length) and 2) getting them for printing and comparison, like "local ep, lev = gv.currentEpisode(), gv.currentLevel(); if (ep==1 and lev==1) then ...". In the second example, I bet that most users unaware of ambiguities such as the
definelevelname/
music one would read this as "if the current level is E1L1", not "E2L2".