v2.0-a026 tentatively changed the behaviour so that % is always required, ostensibly because the syntax varying between parameters is a source of confusion.
However, I've come to see that this directly opposes (to quote Chris) a "key philosophy behind AutoHotkey" -- convenience -- and seems to contradict the decision to keep command syntax, since having the two disparate syntaxes is still a potential source of confusion. I also feel that maybe it's taking things too far, turning AutoHotkey into something else.
As for ease of use for beginners, I think it is of questionable benefit.
- When reading a script, it's fairly obvious that something like x+y is an expression.
- When writing a script, one can write % x+y if in doubt and it will work.
- One always needs to know what the parameter is for and what kind of value it accepts, so the argument that it's hard to remember whether a particular parameter accepts an expression doesn't really hold. As far as I'm aware, the only parameters which accept numbers but not expressions are those which also accept non-numeric values, such as "Off". In most such cases, it will be immediately obvious on attempting to run the script that an expression is not accepted; for example:
Code: Select all
SetTimer foo, x*1000 ; Causes a load-time error in v1 and v2