Firstly (as a general request), please don't ask questions that can be answered by running the alpha. Also, don't make suggestions without first trying the alpha. There are a lot of comments to go through, and there is only so much time available to me. The more time I spend here, the less time I have for real development.
SplashImage and Progress: I need a volunteer to write an alternative script function before I will remove these commands. Also, I realized that SplashTextOn is just an inflexible version of SplashImage/Progress, so I plan to remove it. I'm sure it would be simple to script an alternative, if one was needed.
Multi-statement comma: it has its uses. If you don't know them, you don't need to use it. The change I made to it was purely to make its behaviour more logical and consistent with other languages, not to add any new capability.
The changes to #DerefChar were made primarily to allow experimentation for the alpha. I have decided against $var
as discussed in the plan, so I'll remove #DerefChar sooner or later. #CommentFlag and #EscapeChar will also be removed. I will not add any new directives aimed at "customizing" the language.
"IF" will not require parentheses. However, there probably isn't much use in IF (string1) string2
(auto-concat), so perhaps it can be detected as an IF with same-line action. Then again, maybe it's better not to introduce that subtle ambiguity.
I don't plan to add any functionality to URLDownloadToFile at this stage. However, changes may need to be made to allow for new features later on. For instance, if OutputVar := Download(URL)
will become supported, the command form should probably be Download, [OutputVar], URL [, File]
. Alternatively, it might be possible to use the unique form of the URL to disambiguate; i.e. allow Download, <!-- m -->scheme://location<!-- m -->
is comparison and :=
is assignment. This was discussed in great depth, and Chris seemed in favour of a dual-purpose equals sign. However, I am not Chris. See v2 Issue: Equal sign (=) used to both assign and compare
is addition and &
is bitwise-AND. Both support numeric strings. If I change the concat operator, it will be to remove ambiguity, not to replace it with more ambiguity. Probably the only one with a chance of being implemented is a..b
, from Lua. As an aside, UnrealScript uses $
to concat; the latter places a space between the two operands.
Rather than arguing that literal assignment should be kept because expressions are difficult to use with continuation sections, consider what the real problem is: spreading a string across multiple lines. There are other solutions to that problem which aren't contrary to the goals of v2. For instance, I like the idea of Python's triple-quoted strings.
Consider what a double-deref really is: Array%i%
retrieves the contents of i
, appends it to "Array"
and searches the script's array of variables
for a variable with that name. It's nothing more than Script.Vars["Array" . i]
. Thus, mostly anything you can do with double-derefs can be done with arrays. (However, the reverse is not true.)
There might be some optimization potential to AHKs window Class/ID handling.
Do you have any specific ideas?
Any plans to support optional typing of variables?
No. I do not believe the benefits would be tangible if built on the current interpreter. However, there probably isn't any reason it can't be added after v2 if I change my mind.
Does this call InStr() or Var() ?
Does MsgBox %Var%
deref the InStr
var? The answer is the same. Perhaps MsgBox %(Var(...))
would be clearer.
if literal assignments are kept, I think @= would be better than `=
Why? I think it is neither "prettier" nor more intuitive. `=
is a "literal assignment" just as `%
is a literal percent sign and `,
is a literal comma. ` is also easier to associate with strings than @.
First, there are times when the user may purposely store a variable name in another variable so they can have the name handy, and use a double ref to get the variable contents.
Why may a user do that, other than because that was more or less the only tool available in AutoHotkey Basic?
If dynamic variable references were removed, there would be no simple way to loop throught the variable list.
Why would anyone need to do that?
I think that an array is a fairly intuitive construct. There isn't necessarily any need to expose the user to the more expansive capabilities of objects. They could use objects and not even know it.