Definitely hate that, it should not be a user setting, and it would make a mess of the code and be horribly confusing.
A somewhat better (IMHO) approach I've considered is adding an @ parameter for script compatibility, e.g.
@version 1.2
or something like that. In many, if not all cases compatibility could be handled by a lua file that wraps the relevant functions, so backward compatibility wouldn't need to bloat or complicate the C code.
However, this doesn't really solve the issue for existing scripts in a clean way. I guess we could have the default be 1.2 compatible, but produce a warning or something for scripts that don't have the @version tag.
All in all, I think I'd be more in favor of just breaking compatibility between releases. That's a big part of why we created a development branch and a stable branch, and I do believe that having consistent interfaces is worth it in the long run. Then again, I don't have a whole bunch of popular scripts to maintain.
There are really not a lot of good options that will not create massive confusion and pain. Other than leaving things the way they are that is. Or defaulting things so that @version type stuff "just works" for existing scripts.
Sorry.
Much as I hate to say this, the desire to "purify" the coding conventions at the expense of breaking a rather large installed base is questionable. If we do nothing, things will just carry on as they are. The five or six people who actually write the better scripts that people seem to like will live with the "unpurity", code around it, and carefully wash their hands with soap after touching them. And the scripts will just work.
All in all, I think I'd be more in favor of just breaking compatibility between releases. That's a big part of why we created a development branch and a stable branch, and I do believe that having consistent interfaces is worth it in the long run. Then again, I don't have a whole bunch of popular scripts to maintain.
The distinction between 1.1.0, 1.2.0, 1.3.0 etc means a lot to those of us that live here. And nothing to everyone else.
I tend to suspect that 9 out of 10 CHDK casual users ( statistics made up on the spot ) will simply walk away when the script they have downloaded fails with a Lua error message.
Although, to #include another thread's topic, if 1.4.0 included most of the most popular scripts, suitably sorted & updated, that might help?
EDIT :I think I could live with a change (1.2.0 -> 1.3.0) that also produced a meaningful error message (i.e. verbose) the did not simple say standard Lua error messages related to something about boollean expected ... something that clearly said ("You need a newer version of this script to work with the version of CHDK you are using").
(Editorial Note : just to be clear, the most difficult to understand Lua error message is still 10x better than the best uBASIC error message.)