lexikos wrote: ↑05 Jul 2019, 19:48
It has been said before that AutoHotkey became popular because of what it can do, not because of its syntax. Do you believe that it would have been less popular if the v2 language had been implemented from the beginning? I do not.
As usual Lexikos, you have my utmost respect, despite some minor disagreements.
On this point, I'm not so sure. It could be that AHK v2 would have been less popular than AHK v1. This might be the case, because of how AHK v1 overtook AutoIt v3. Many of the things that some AHK v2 advocates argue for, were implemented in AutoIt v3 and later versions. Stripping out labels, Gosub, Goto, etc... If a final version of AHK v2 followed the same path as AutoIt v3, it might not be as popular. Changes to AutoIt from v2 to v3, outside of the ability to create GUIs, didn't make it any more popular. Instead, AHK v1 gained a larger audience, debatably at the expense of AutoIt v3.
It might be that the easier to use and understand syntax of AHK v1 was a key factor in this, in addition to greater conveniences like hotkeys. With that typed, I do think the large number of improvements and increased functionality that you (Lexikos) and other developers had made to AHK v1 were also part of the increase in popularity. But so to, has AutoIt v3 improved. So maybe there is something more to the syntax and language choices made, that it should not be so quickly dismissed.
For the most part, AHK v2 has kept much of the syntax, functionality, and "spirit" of AHK v1, so I don't think learning the new version will be so dramatic to long time users. Though obviously the vast number of libraries made with AHK v1, will also be incompatible and need to be re-written. To include tools like AutoGUI and AHK Studio should probably have an AHK v2 version or replacement. I think there will be a certain amount of inconvenience, that nobody can say how many will react to this. The overall popularity of a language might also have to do with software development tools that are available and examples of usage, not just syntax.
lexikos wrote: ↑05 Jul 2019, 19:48
It has also been said that AutoHotkey became popular
despite its syntax.
I've often perceived the attacks on AutoHotkey syntax, to be from those who are programming in other languages, and have become used to those languages. When I look at AutoIt syntax, I see a lot of what can be called problematic and weird. And a bit of what they say (which appear to often be AutoIt folks) comes from rivalry and resentment that AutoHotkey forked off. When I go on other forums, I will see Object Pascal guys say harsh things about C++, and the opposite from advocates of other programming languages about Object Pascal. I think people can become accustomed to how things are done in their preferred language. Not all the criticism is valid, or the complaint about the syntax can actually be quite minor.
With that typed, the need for change and to evolve is understandable. AutoHotkey can't always stay the same, and hopefully the changes made are for the better.
lexikos wrote: ↑
Functions are just as simple (this will also run in v1).
Agreed. I'm not against functions. It is also correct that learning them is essential for greater understanding of other programming languages. Though one could debate the percentage of AutoHotkey, AutoIt, or WinBatch users that use just the one language or are primarily focused on automation as opposed to general-purpose programming. Also, I think g-labels should be able to use both labels and functions, and that the use of labels should be maintained in AHK v2.
lexikos wrote: ↑
The legacy syntax is sometimes suited for automation in the sense that quotation marks can be omitted for most parameters (window titles, keystrokes, etc.), but do not mistake this to mean the language was
built around automating tasks. The legacy syntax primarily exists because of decisions made
nearly 20 years ago by the author of AutoIt (from which the legacy syntax was copied), who replaced that "really horrible" syntax (as he called it)
over 16 years ago. It's likely that the design was motivated by lack of experience more than any concerns over what is suitable for automation;
In looking at the history, AutoIt was heavily inspired by WinBatch, in terms of types of commands, syntax, and various other aspects. ScriptIt (from WinBatch) was a free tool previously promoted by Microsoft prior to AutoIt. Below is example syntax of ScriptIt.
https://docs.microsoft.com/en-us/previous-versions//cc723493%28v=technet.10%29
(The MS ScriptIt Utility, April 1, 1998)
WinBatch, created in 1991, with it's commands and syntax were no accident. The design of WinBatch or ScripIt didn't come from lack of experience, but was
specifically tailored to make things easier for Windows users. It was a "battle tested" product, in existence for many years. Something to take note of, as the Win-
Batch name implies, their syntax was influenced by Microsoft Windows Batch Scripting.
"Its language structure and syntax is a cross between DOS batch command, Basic, Fortran, and C..." Before there was WinBatch, there was Command Post, which was created in 1989. WinBatch was derived from the menuing language of Command Post, in 1991. Command Post allowed users to custom design and make changes to Windows menus. Keep in mind that Windows was much more primitive then, but we are talking about an automation concept somewhat similar to Hotkeys, at that time. Where the user could simply click an application's name and launch programs or tasks directly, without have to go through a long list of submenus. What took multiple clicks, could be done with one click.
WinBatch took the concepts of Command Post a step further, creating a programming language and code binder (combining a bytecode version of a program along with an interpreter). Jonathan Bennett made a kind of alternative open source freeware version of ScriptIt (WinBatch). Apparently, Chris Mallett knew this as well. And has mentioned this in the old forums of how AutoIt v2 syntax was heavily inspired by ScriptIt (WinBatch). I think Jonathan Bennett has written on this too. In fact the very name of Auto
It, seems to be a play on words and paying homage to Script
It.
WinBatch (from years ago) also has expressions, functions, etc... It's hard to say to what extent changes in that language might have influenced the direction of AutoIt v3. And this likely went back and forth between the automation languages. Where new ideas in one, influenced the others. Debatably things went in the other direction too, where WinBatch was inspired by and got ideas from AutoIt and AutoHotkey.
As a comparative reference between languages and to see examples of usage, below is the WinBatch manual.
https://web.archive.org/web/20170710090254/techsupt.winbatch.com/techsupt/PDFs/wil-lang20170412.pdf
lexikos wrote: ↑Chris recognized long ago that the
legacy syntax should be removed, I agreed when I began v2 years ago, and if anything, I have only grown more certain that it was the right decision.
Totally understand and agree with the direction. Though looking at the old archive debates on this, I thought Chris also wanted to remove the AutoIt legacy GPL code so that a more permissive license could be granted, like LGPL or BSD, and finally stop the controversy that was involved over that.
I'm not in disagreement with rewriting the code, but have caution about whether or not some functionality or convenience is/will be lost. I would hope that AHK v2 could do anything that AHK v1 could do, plus more and just as easily.