Who is AutoHotkey v2 for?

Discuss the future of the AutoHotkey language
iseahound
Posts: 479
Joined: 13 Aug 2016, 21:04
GitHub: iseahound

Who is AutoHotkey v2 for?

12 Jan 2020, 20:40

Who is AutoHotkey v2 for?
  • Is it for the average AutoHotkey user who wants useful scripts already written for them?
  • Is it for data intensive users, despite no built in ability to parse JSON, or export objects?
  • Is it for people who want a cleaner language? v1 is confusing yet easy to get started with.
Many of the changes are not features. They are simply commonly used design paradigms, now being forced upon the user.
Example: You're forced to use a class now. Good luck trying to create an object that you can instantiate like v1 - you'll have to have extensive knowledge of special syntax and built-in prototype objects now. Have fun chaining .DefineMethod and .DefineProperty.

Please limit yourself to one post only.
User avatar
nnnik
Posts: 4371
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Who is AutoHotkey v2 for?

13 Jan 2020, 11:03

Could you explain in which case it is necessary to create a class using .degineMethod and .defineProperty?
Recommends AHK Studio
swagfag
Posts: 3250
Joined: 11 Jan 2017, 17:59

Re: Who is AutoHotkey v2 for?

13 Jan 2020, 12:15

v2 currently is for those who are ok with trading the lack of readymade libraries for programming and sanity features. so lets say #3, i suppose.

by whose definition is v1 easy to get into? v2 is just as easy to get into, except theres far fewer edge cases ull eventually get tripped by.

also, i think ur example is flawed. v1 also forces u to use classes. i dont see very many people around whose workflow looks like this:

Code: Select all

CatClass := {speak: Func("meow")}
DogClass := {speak: Func("woof")}
dog := {base: DogClass, legs: 4}

woof(this) {
}

meow(this) {
}
Last edited by swagfag on 14 Jan 2020, 11:53, edited 1 time in total.
User avatar
kczx3
Posts: 959
Joined: 06 Oct 2015, 21:39

Re: Who is AutoHotkey v2 for?

13 Jan 2020, 20:30

The only reasonable way that I wouldn’t use classes is if we could have inline anonymous functions. And even then, classes look much cleaner. It’s an encapsulation if functionality. I’d only use definemethod and defineprop to modify an existing base class I think.
SOTE
Posts: 895
Joined: 15 Jun 2015, 06:21

Re: Who is AutoHotkey v2 for?

14 Jan 2020, 17:13

I don't see this as a good example, especially since no code was posted by the user. If anything, the user can be confusing and making things more difficult on themselves because they feel pressure to use classes as oppose to just using functions. Like how people can feel pressure to follow the latest fads, fashions, diets, and hair styles. As doing such is an improvement or not, can be hard to say. Where something could have been done simply, some people feel it's more important to code in a way that will impress others or that it would be more impressive to their own ego to do it in the most complicated and difficult way possible. Or maybe the right question and answer is how many options the user is or is not getting.

It's not to say that one side is always better than the other (simple vs advanced vs less options vs more options), because the way a person chooses to code should arguably be what is most comfortable to them and what is the most efficient (which often is subject to debate). As for this topic, more specifically, I suppose time will reveal all. When/if we look back on this 5 or more years later, which path should or could have been followed will be much more evident.
swagfag
Posts: 3250
Joined: 11 Jan 2017, 17:59

Re: Who is AutoHotkey v2 for?

14 Jan 2020, 19:06

the point is v2 would have pointed out what(and/or where) the error was, whereas v1 would have failed silently(as is customary) and left u wondering where exactly u done goofed up, wasting ur time scouring the docs for post hoc rationalizations. (i may or may not be speaking from personal experience)
SOTE
Posts: 895
Joined: 15 Jun 2015, 06:21

Re: Who is AutoHotkey v2 for?

14 Jan 2020, 19:29

swagfag wrote:
14 Jan 2020, 19:06
the point is v2 would have pointed out what(and/or where) the error was, whereas v1 would have failed silently(as is customary) and left u wondering where exactly u done goofed up, wasting ur time scouring the docs for post hoc rationalizations. (i may or may not be speaking from personal experience)
Yes, your point is quite valid, but it doesn't address what the user was doing in the first place. It isn't the place of the programming language to tell the user how to program, but rather the user should be more clear about what they want to do and what the program will do. Like who would just go start building a house, but without any plans or blueprints? A better gun can help one shoot more accurately, but it's purpose isn't to tell the user what, where, when, why, or how to shoot. Additionally, a gun that is easier to operate can be the "better" option in various circumstances, so it depends. If the user is clear in purpose and the easier it is for them to understand what they are doing, there is less need for any secret formulas (per user comment).
User avatar
nnnik
Posts: 4371
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 03:53

So the user wanted to learn how to make Objects and your response is "He shouldn't learn objects" to the troubles he is having?
Recommends AHK Studio
SOTE
Posts: 895
Joined: 15 Jun 2015, 06:21

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 07:15

nnnik wrote:
15 Jan 2020, 03:53
So the user wanted to learn how to make Objects and your response is "He shouldn't learn objects" to the troubles he is having?
I'm not saying the person did anything bad. It's mostly a free world, and we can usually do what we like. However, it appears the user was playing around aimlessly with classes and objects. In such a circumstance, it's not surprising that it would lead to confusion or being lost. It's like trying to find a solution, when no problem exists. Wandering around aimlessly in the city, then being surprised one got lost. Debatably, it's better to have a problem first, then find various solutions for it. Even if we are talking just experimentation, it might be best to at least create an objective, goal, or problem on paper to help guide the direction.

In this way, when he was offered help, he could at least show something or more clearly describe what he wanted to do. Then it might become more obvious if using classes and/or objects would be the best way to solve it or not. To include being open-minded about the types of solutions that are possible or most practical.
User avatar
nnnik
Posts: 4371
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 09:17

I think you are making assumptions about the user you cannot back up.
Regardless said user wouldn't have had the same problem in v2.
Experimenting both aimlessly and with a goal/problem in mind will be easier due to the increased errors that get reported.
Recommends AHK Studio
swagfag
Posts: 3250
Joined: 11 Jan 2017, 17:59

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 12:47

im talking in general, not specifically about classes. the silent suppression of errors is an underlying issue plaguing mostly the entirety of v1.
check this out: :arrow: why is my MsgBox blank??
SOTE
Posts: 895
Joined: 15 Jun 2015, 06:21

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 15:28

swagfag wrote:
15 Jan 2020, 12:47
im talking in general, not specifically about classes. the silent suppression of errors is an underlying issue plaguing mostly the entirety of v1.
check this out: :arrow: why is my MsgBox blank??
Ok, here we have some code to review, versus conjecture about what might be the case. But getting blank from MsgBox, might be telling you something went wrong, and to try something else. It depends, as a blank MsgBox is not always unwanted or wrong.

And the code could have been constructed differently, as below, to see what each loop was doing (thus you could have blank and data filled MsgBoxes). That it wasn't initially seen to do such, might even be because of the style of indentation chosen made overlooking such easier to do.

Code: Select all

max := 0
Loop Files, C:\Users\xxxx\projects\*, D
{
	MsgBox % max(max, A_LoopFileName)
}
But anyway, a solution was found, because the programmer was looking for a type of result and constructed his code accordingly. After all, code is just instructions that programmers are giving, not the program guiding one to what they are suppose to do. Thus...

Code: Select all

max := 0
Loop Files, C:\Users\xxxx\projects\*, D
	if A_LoopFileName is integer	
		max := max(max, A_LoopFileName)
MsgBox % Max
I'm not saying that v2 can not have advantages over v1, but every change is not always beneficial, better, or necessary. I think what the OP might be getting at (though he can clearly speak for himself), is are many of the changes reflective of input and requests from the community. Is average Joe going to be saying, "Yeah, I need or want that!"

Edit- Grammar correction.
Last edited by SOTE on 16 Jan 2020, 20:16, edited 1 time in total.
swagfag
Posts: 3250
Joined: 11 Jan 2017, 17:59

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 16:06

an empty msgbox is enough of an indication
:roll:
ure unironically suggesting we fact check every "instruction" with msgboxes. i dont know what to say. im flabbergasted.

wouldnt it be much nicer if the language did this automatically for us instead? like how v2 already does? lol

i wonder how many average joes out there are cursing the devs out, after having wasted entire weekend afternoons tracking down each and every instance, where the language decided to "do u a solid" by continuing to "process" what was evidently garbage input data to begin with
SOTE
Posts: 895
Joined: 15 Jun 2015, 06:21

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 16:26

swagfag wrote:
15 Jan 2020, 16:06
an empty msgbox is enough of an indication
:roll:
ure unironically suggesting we fact check every "instruction" with msgboxes. i dont know what to say. im flabbergasted.

wouldnt it be much nicer if the language did this automatically for us instead? like how v2 already does? lol

i wonder how many average joes out there are cursing the devs out, after having wasted entire weekend afternoons tracking down each and every instance, where the language decided to "do u a solid" by continuing to "process" what was evidently garbage input data to begin with
But nothing stops a programmer from seeing the result of MsgBoxes that are not empty or has data of a certain type. That's why if Var is Type (if A_LoopFileName is integer) was used. My pushback on this, is that the "empty" MsgBox doesn't seem like an error, but rather an unintended result. That clarity in one's intention and objective for a program, will often be more important than just error reporting.

Arguably, the vast majority of users are not cursing out the AutoHotkey developers, but are thankful of them. But if the intention is to sell Average Joe on v2, the benefits will likely need to be more obvious or impactful to their reality.
gregster
Posts: 3623
Joined: 30 Sep 2013, 06:48

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 16:32

iseahound wrote:
12 Jan 2020, 20:40
Who is AutoHotkey v2 for?
  • Is it for the average AutoHotkey user who wants useful scripts already written for them?
  • Is it for data intensive users, despite no built in ability to parse JSON, or export objects?
  • Is it for people who want a cleaner language? v1 is confusing yet easy to get started with.
[...]
Please limit yourself to one post only.
If I understood Iseahound correctly, he exactly wanted to avoid discussions like the one that is developing right now in this topic - he just wanted a statement, your opinion. He explicitly and politely asked for one statement per user. I think, this wish should be respected in this topic.

In regard to this, I think the details of these squabbles are heavily distracting from the actual topic and not overly interesting for most users. Perhaps you could try to hash out your differences in PMs, and if necessary, make one final, consolidated statement here about who you think "AutoHotkey v2 [is] for".
swagfag
Posts: 3250
Joined: 11 Jan 2017, 17:59

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 18:05

im well aware of iseahound's request. to be frank, i find it rather naive, if not asinine. this is a forum, after all - where people gather to discuss things. a discussion cannot take place if one is constrained to a single post only. i suppose, what he could have done differently is make his thread, request people DM him their opinions, have a mod lock the thread and, after a while, unlock the thread, allowing him to publicize the opinions he had received(if he so desired). though, the thread probably would have died down early on and wouldnt have gained much traction.

SOTE has made up his mind, i have made up mine. i wont be able change his, nor will he be able to change mine, so duking it out in the DMs is largely pointless. instead, the only remaining sane thing that we can do is make our cases on the public space. i wont leave statements i have a problem with unchecked. any potential readers can ultimately make their own minds up.
consolidated statement wrote:its for literally anyone that doesnt miss v1 libraries
gregster
Posts: 3623
Joined: 30 Sep 2013, 06:48

Re: Who is AutoHotkey v2 for?

15 Jan 2020, 19:19

I would like to add that this topic is not meant for meta-discussions, either, like most other topics.
Feel free to contact me via PM (like I just did in a longer response to swagfag) or open a topic in an appropriate forum, if you would like to continue to discuss forum etiquette or any other meta-topics. Thank you for your understanding!

@swagfag and others:
Well, I am sure you are aware that iseahound's wish is only about this specific topic - and not the whole forum.
After the civility problems in some of the escalated discussions in the last years, I find this approach is worth a try, for selected topics like this.

There are plenty of other topics already, you can even create your own new topics. That's why I see it as a lack of respect to your fellow user to not follow their request - and it is not like you weren't allowed to make several posts in this topic until now. You, and others, were simply asked to focus from now on.

If asking for this - and expecting mutual respect - is "asinine", feel free to call me it, although I find it naïve to think that this is constructive behaviour in a forum.
I will insist nevertheless. After all, this forum had already its fair share of similar discussions that went sideways.

Edited

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 6 guests