Will AutoHotkey v2 Syntax Be More Confusing For Newbies?
Posted: 30 Sep 2018, 00:20
After a discussion with a friend, an interesting issue resulted. Is AutoHotkey Version 2 something that experienced or trained programmers find comforting, at the expensive of beginner and casual programmers? Let's look at various syntax. For example, String Replace (StrReplace() / StringReplace). I'm wondering if experienced or high level programmers forget what it's like to start out and not know programming.
Which is more easily readable and understandable? Arguably, Version 1 syntax is more easily understood.
The word StringReplace changed into StrReplace, then adding in "Haystack" can be confusing. So maybe there needs to be clarification about the syntax for version 2, when you no longer have the syntax of StringReplace and just StrReplace. And this goes for other such similar syntax changes.
Version 2 syntax-
Version 1 syntax-
I didn't realize this was even an issue, because even though I'm a casual user, I had become familiar with AutoHotkey over many months so the change in syntax wasn't so bothersome. However, when introducing the language to a friend who is a non-programmer, these "strange" syntax abbreviations and readability immediately became an issue for understanding.
Maybe part of this "confusion" can be alleviated in the help document, if it's felt that abbreviated wording must be used as keywords, by having the whole word String Replace at the top.
So a keyword lookup would look like
Which is more easily readable and understandable? Arguably, Version 1 syntax is more easily understood.
The word StringReplace changed into StrReplace, then adding in "Haystack" can be confusing. So maybe there needs to be clarification about the syntax for version 2, when you no longer have the syntax of StringReplace and just StrReplace. And this goes for other such similar syntax changes.
Version 2 syntax-
Code: Select all
ReplacedStr := StrReplace(Haystack, SearchText [, ReplaceText, OutputVarCount, Limit := -1])
Code: Select all
StringReplace, OutputVar, InputVar, SearchText [, ReplaceText, ReplaceAll]
Maybe part of this "confusion" can be alleviated in the help document, if it's felt that abbreviated wording must be used as keywords, by having the whole word String Replace at the top.
So a keyword lookup would look like
StrReplace (short for String Replace)