engunneer wrote:
Some of these are hard (or impossible) to detect.
Yup, things would need to be prioritized according to effort etc. . The list is just an example of some warnings. I guess almost any experienced AHK user can come up with some personal gripes.

Quote:
- %array9% is 'valid' only when a previous StringSplit (for example) gives 9+ results. AHK may not know ahead of time whether the StringSplit will resolve to that many items (at compile time)
The warning does (and should not) be generated at compile time, but at runtime. At runtime, for every variable name, AHK knows whether it encountered it, at the moment when its value is needed.
Quote:
- Numbers and strings are usually the same thing, so it might be hard to detect.
Let me elaborate. Let's say someone mistypes "MouseClick, LEFT, 123, 1oo". Silly, I know, but bear with me. Right now, AHK will happily process this and complain neither at compile- nor at runtime. Also, when executing the line, nothing happens at all (the pointer does not move). But AHK obviously detects that something is wrong (else, SOMETHING would be happening, say, an equivalent of "MouseClick, LEFT, 123, 0"), it may as well output a warning (or, error, in this case), making this almost impossible to find error easily caught.
I am aware that going through every function to check for things like this may be too much effort for the developer(s?), just pointing out possibilities.
Quote:
- Would love this one. You might say we already have it, since nothing is officially deprecated, though I and others have posted about what we would like to see 'officially' deprecated.
It would even be pretty useful if the programmer could tell AHK what he (the programmer) considers deprecated. I.e., I always try to use "a := b" instead of "a = %b%" and would be happy if I could tell AHK to warn me about an accidental "a = b" with something like "#Warning PreferExpressions" or whatever. Or, if I would like it the other way round, a "#Warning AvoidExpressionAssignment" - both warnings would be useful for some people. That does not mean that AHK officially needs to deprecate that feature, i.e, a simple "#Warning" would, per default, not enable this specific Warning.
Quote:
Thanks for posting.
Pure selfishness.

jaco0646 wrote:
This is currently #28 on the "Top 40" list.
Thanks for pointing it out (that's forum
http://www.autohotkey.com/forum/viewtopic.php?t=37566 ).