Should I start learning v1.1 or jump straight to v2

Discuss Autohotkey related topics here. Not a place to share code.
Forum rules
Discuss Autohotkey related topics here. Not a place to share code.

Should I start with learning v1.1 or v2

v1.1
7
23%
v2
24
77%
 
Total votes: 31
SW_MC
Posts: 2
Joined: 25 Dec 2018, 20:35

Should I start learning v1.1 or jump straight to v2

01 Jul 2021, 23:06

Hi,

I'm relatively new to the AutoHotkey community and want to start learning more about what AHK has to offer because I know it can do some really powerful stuff. That being said, I realize AHK is kind of in the middle of a transition between v1.1 and v2, which from my understanding, are drastically different. I wanted to get peoples opinion's on if I should start with learning v1.1 now or save myself the headache of having to relearn things later and just jump straight into v2. I feel like I am hesitant to dive into v2, as I think there are going to be far fewer resources available to refer to when writing my own code.

Additionally, I wanted to ask, what exactly is the reasoning behind the large change from v1.1 to v2? I'm not sure what problem is being solved exactly and wanted to know what benefits are offered by v2; is it worth migrating to at all or should I just strictly stick with v1.1?

Thank you in advance!
lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: Should I start learning v1.1 or jump straight to v2

03 Jul 2021, 22:37

For the most part (as in, for the majority of what you will do as a new user), v2 uses a subset of the v1 syntax. It is much more consistent, with less syntax to learn overall, and fewer stumbling blocks (points of confusion).

Additionally, I wanted to ask, what exactly is the reasoning behind the large change from v1.1 to v2?
What exactly is the large change to which are you are referring? :)

AutoHotkey v2 contains over 10 years worth of changes that couldn't be made in the v1 branch due to the need for backward-compatibility, or weren't feasible (or worthwhile) to implement on the outdated codebase of v1.

AutoHotkey v2 contains the original rationale and a number of changes that were considered by the original developer (Chris Mallett) and others involved in the discussions. However, Chris never (publicly?) started development of v2. The current state of v2 was influenced by these original "plans" but directed more by my opinions and preferences.

what benefits are offered by v2
Changes from v1.1 to v2.0 contains a very long list of changes, most or all of which are beneficial, though that is subjective.

is it worth migrating to at all or should I just strictly stick with v1.1?
These seem to be two different questions:
1) Should I start with v1.1 or with v2.0?
2) Is it worth migrating from v1.1 to v2.0?

If you start with v2.0, you do not need to learn v1.1, and you have nothing to migrate. On the other hand, learning v1 and how to translate v1 code to v2 would unlock more learning resources, even if you are using v2 exclusively.

What kind of developer would release a new version of a program and then tell anyone that it isn't worth migrating to? ;)
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Should I start learning v1.1 or jump straight to v2

04 Jul 2021, 06:34

If You want to use ready-made scripts and functions then ahk v1.1 - better variant.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Should I start learning v1.1 or jump straight to v2

04 Jul 2021, 10:03

im surprised to such overwhelming support in favor of v2(even though i did vote for it myself :lol: ) we need some v1 sycophants(u know who u are) to get in here and balance it out :lol:
is it worth migrating to at all or should I just strictly stick with v1.1?
eventually ull have to. just like all the AHK Basic folk had to when v1.1 AHK_L came about. or u could become a holdover exile i guess, im sure there must be at least a couple Basic ones still around
should start with learning v1.1 now or save myself the headache of having to relearn things later
not only would u have to relearn some things if u were to do that, ud also actively have to UNlearn a whole lot more other things. given the above premise, to me this just seems like a massive waste of time
hesitant to dive into v2, as I think there are going to be far fewer resources available to refer to when writing my own code.
that is unfortunately true. not only that, the few that u will stumble upon are likely to be outdated ones(some even massively so). the only examples kept up to date are the ones u can find in the docs, but there's not that many of them and most are very rudimentary. so for anything more complex, ull have to read the docs, infer and come up with the code on ur own.
what benefits are offered by v2
saner, more consistent programming flow. better error reporting.
we've gotten to a point where the only thing v1's got going for it is the fact that there are simply more scripts written for it out there. once sufficiently adept migration tooling is released, thatll be the last nail in the coffin for v1
lexikos wrote:
03 Jul 2021, 22:37
On the other hand, learning v1 and how to translate v1 code to v2 would unlock more learning resources, even if you are using v2 exclusively.
true, but i dont believe thats feasible for newcomers. to translate v1 code to v2, u need to know v1 very well(and arguably v2 just as well). i guess it depends on the code, but generally speaking...
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: Should I start learning v1.1 or jump straight to v2

07 Jul 2021, 00:28

I'm not against AHK v2, because it is clearly inevitable and after all I'm also a supporter of AHK in general. My slight push back about going straight to v2 is that it's not yet a Beta release nor the stable release version.

1) I think that if a person is creating programs that they must rely on, say at their business or school, then AHK v2 could present some problems.

It's not cool to have to deal with breaking changes and then try to update scripts to a newer version. Stability and reliability are important too. I know there are those that are advanced programmers or just like being on the bleeding edge, but that's not the case for everyone.

2) There is a tremendous amount of example code in AHK v1.

Some might want to wait a little while for AHK v2 code to catch up a bit, in terms of libraries, script examples, and help. Some examples of AHK v1 software that many use are AHK Studio, Pulovers Macro Creator, etc...

With those 2 points typed. If a person is not concerned about reliability and just experimenting, then that can be a point for AHK v2. It also appears to me that those that want the transition accelerated, might want to put some emphasis on AHK v1 to AHK v2 "script converters". Even if such conversions can't be 100%, help suggestions might also ease and accelerate the transition. This will probably help to bring over a higher percentage of more established AHK v1 users, not just newbies.
swagfag wrote:
04 Jul 2021, 10:03
we need some v1...
How rude... But, I will help bring balance to the Force anyway :lol:
lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: Should I start learning v1.1 or jump straight to v2

07 Jul 2021, 03:52

As I've mentioned in other topics, v2.0-beta.1 was planned for June or July. It is actually only a matter of chance that I didn't release it on Thursday morning last week (which would have been June or July depending on the timezone ;)), because I had other commitments. All changes planned to be part of v2.0-beta.1 are already implemented in the head commit, which includes only one minor "breaking" change since v2.0-a138.

Spoiler
iseahound
Posts: 1427
Joined: 13 Aug 2016, 21:04
Contact:

Re: Should I start learning v1.1 or jump straight to v2

07 Jul 2021, 10:50

Thanks for the great documentation. The v1.1 changes to v2.0 page is very comprehensive.
User avatar
lmstearn
Posts: 681
Joined: 11 Aug 2016, 02:32
Contact:

Re: Should I start learning v1.1 or jump straight to v2

25 Jul 2021, 09:13

SOTE wrote:
07 Jul 2021, 00:28
It also appears to me that those that want the transition accelerated, might want to put some emphasis on AHK v1 to AHK v2 "script converters". Even if such conversions can't be 100%, help suggestions might also ease and accelerate the transition. This will probably help to bring over a higher percentage of more established AHK v1 users, not just newbies.
Sounds good, this one seems to be the most up-to-date.
Beta is here! :D
:arrow: itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: Should I start learning v1.1 or jump straight to v2

28 Jul 2021, 11:53

@lmstearn

Probably better to have an offline converter or to use it as such, unless just converting smaller bits of code for example purposes. Still, looks good.

I'm still a bit leery about using a Beta versus Stable release or official release. I don't see the need (and probably others) to rush switching over just for the sake of it. Many people are not coding at the level where v2 has things they can't live without, so they will probably be more conservative. As AHK_L Beta v2 proves itself, people do more studying on it, and more examples and projects are available then you will likely see a gradual shift. You have to keep in mind there are many AHK_L v1 and AHK_H v1 scripts that are working perfectly fine (which is a credit to the developers).
AHK_user
Posts: 515
Joined: 04 Dec 2015, 14:52
Location: Belgium

Re: Should I start learning v1.1 or jump straight to v2

28 Jul 2021, 12:50

If you are new, I would try to use V2, the only disadvantage is the lack of examples.

I also started some year ago to try to use more the V2 syntax, so the conversion would be easier.

Another disadvantage is that most editors do not support V2 Yet...
User avatar
joedf
Posts: 8937
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Should I start learning v1.1 or jump straight to v2

28 Jul 2021, 12:55

Here's I see it if I were new to AHK... :think:
  • If you just want to get things working, automate a few things and use some existing functions => use v1.1
  • If have some experience and you want to learn AHK => use v2
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: Should I start learning v1.1 or jump straight to v2

29 Jul 2021, 07:00

joedf wrote:
28 Jul 2021, 12:55
  • If you just want to get things working, automate a few things and use some existing functions => use v1.1
  • If have some experience and you want to learn AHK => use v2
I agree with this about v2. So far, it looks like the more experienced AHK users or those with programming backgrounds that are seeking to push the language to the edge, will probably be those to get the most benefit. Many of the new and average users might be best served with v1, because either they aren't getting that deep into programming or there is more examples to follow.
AHK_user wrote:
28 Jul 2021, 12:50
Another disadvantage is that most editors do not support V2 Yet...
True. The availability of tools and examples can make a significant difference for many. With that typed, of course things will eventually shift.

Something else to think about, is maybe experienced AHK v2 users can start to explain their reasons or their must haves in the new version, which compelled them to switch over because they couldn't do those things in v1.
SandyClams
Posts: 63
Joined: 02 Jul 2020, 11:55

Re: Should I start learning v1.1 or jump straight to v2

29 Jul 2021, 11:01

I think v2 has a lot more going for it if you're just starting to learn it. I feel that v1 has a lot of weird quirks and any consistency was basically patched around it. Sometimes plaintext is variables, sometimes it's function names or command keywords, sometimes it's a string value.... oh hey, now we're in an expression context, now strings are quoted, my variable assignment became a comparison, functions maybe don't go by their names any more, but wait, they can still be named variables, but only if you call this one function, and oh, the argument is a string, and its value is the function's name. What!

v1 is manageable if you're just doing something simple, but learning to do more complex things requires you learn a lot of weird quirks. Even after learning the quirks, I personally feel it's still tedious to write. v2 on the other hand is just as manageable if not more so when you're doing something simple, but I feel like, the more functionality you add, its superiority and ease over v1 only increases. I don't think there's pretty much any reason for a casual user to start with v1.

there's still the issue of so much existing code being v1 code of course, but I don't think this is very significant. If you want a prerolled v1 script, just find one and use it. If you're trying to learn concepts and usage patterns from a v1 script, that's cool, but in my experience, you can still generally do this, it just requires some familiarity with the relevant v2 territory. Most of my v1 knowledge was absorbed this way. Mind you, I can barely even write v1 code, but I can sure read it if I need it.
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: Should I start learning v1.1 or jump straight to v2

29 Jul 2021, 11:54

SandyClams wrote:
29 Jul 2021, 11:01
...there's still the issue of so much existing code being v1 code of course, but I don't think this is very significant...
Sorry, but I would have to strongly disagree with this part. If a person is starting from zero/scratch, and has no background in programming, they often could use all the help that they can get. For experienced users or programmers, they can be a lot more comfortable with bare bones or have lots of resources they know can help with a project. That may not be the case for newbies. It's not just about language "superiority", it is also about the examples, editors, libraries, etc... The things that come along with the language, can often make the difference in terms of convenience and usability.
lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: Should I start learning v1.1 or jump straight to v2

15 Aug 2021, 00:38

The higher volume of publicly available v1 code also has significant downsides. The complexity/duality of the syntax and the many quirks mean not only more to learn and more hurdles, but also greater mental burden while reading and learning from v1 code. New users learning from v1 code must learn syntax and concepts that are obsolete, some parts even in v1.1. Some aspects of the syntax and runtime behaviour lead toward code that is error-prone and difficult to debug, which can mean problems not only in the new user's code, but in the code they're learning from.

I mean, most of the arguments against the v1 syntax itself and the process of learning v1 also serve as arguments against the value of the high volume of v1 example code.

Having a lot of example code and libraries available doesn't stop new users from hitting all of the stumbling blocks inherent to the v1 syntax.
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: Should I start learning v1.1 or jump straight to v2

15 Aug 2021, 05:56

lexikos wrote:
15 Aug 2021, 00:38
The higher volume of publicly available v1 code also has significant downsides. The complexity/duality of the syntax and the many quirks mean not only more to learn and more hurdles, but also greater mental burden while reading and learning from v1 code. New users learning from v1 code must learn syntax and concepts that are obsolete, some parts even in v1.1. Some aspects of the syntax and runtime behaviour lead toward code that is error-prone and difficult to debug, which can mean problems not only in the new user's code, but in the code they're learning from.

I mean, most of the arguments against the v1 syntax itself and the process of learning v1 also serve as arguments against the value of the high volume of v1 example code.

Having a lot of example code and libraries available doesn't stop new users from hitting all of the stumbling blocks inherent to the v1 syntax.
I can understand your perspective, because of v2 finally hitting beta, and it is something yourself and those that helped in development should be rightfully proud of. And don't get me wrong, I acknowledge that v2 has improvements over v1/v1.1. However, various users might look at things from a different perspective. The v2 beta isn't the official release yet, which means it's still evolving to that point. That can be a reason for people that would use AutoHotkey code in their business to be conservative about the transition. I totally understand the argument of v2 being "linguistically" superior to experienced programmers, but that doesn't necessarily mean it is easier to adapt to or use at the present. Not the version itself, but what is surrounding it.

The argument that I proposed is about the tools, libraries, examples, editors, and help surrounding the version. Maybe look at it as the infrastructure surrounding the version. For example, a v1.1 newbie could quite easily find Jack's AutoHotkey blog or numerous ebooks at https://jacks-autohotkey-blog.com/, AHK_v1.1 code on Reddit (https://www.reddit.com/r/AutoHotkey/), CivReborn YouTube videos (https://www.youtube.com/user/CivReborn/videos), or Joe Glines videos (https://www.youtube.com/c/JoeGlines-Automator/videos) or blog (https://www.the-automator.com/).

At the present, it could be debatably easier to get up to speed with v1.1 (in terms of using AutoHotkey productively) because of the tremendous amount of existing information and code examples. For many non or casual programmers, it can be not so much about which version is better, but which is easier and more convenient to use to solve their issues. I think the gap between a knowledgeable AHK_v1.1 user jumping over to AHK_v2 is relatively minor (it is AHK after all).

Something to think about as well, is that AHK_v2 has various idiosyncrasies that can cause confusion to newbies, as does AHK_v1 and all programming languages. There will always be various minor things to fuss about, but the different versions within the AutoHotkey language are similar enough that experienced users can more easily overcome them. A stronger argument, over "version superiority", is about the surrounding "infrastructure" and how convenient it is to create useful scripts.

Of course, as time goes on, I expect a switch over similar to what happened with v1 to your v1.1 (which by the way hats off to what you created). Eventually, more and more will be available in v2, making it easier on non or casual programmers to use. Like having v2 editors, v2 YouTube videos, v2 ebooks, etc... Looking at how that happened (v1 to v1.1), it was a gradual process as well. Partially the process is gradual, due to: 1) Familiarity. 2) Being cautious or conservative about switch overs. 3) That existing scripts in a particular version are working well.
densch
Posts: 120
Joined: 29 May 2018, 15:10

Re: Should I start learning v1.1 or jump straight to v2

09 Oct 2021, 16:21

from what I got, the whole legacy vs expression mode nonsense that autohotkey v1 has (and literally no other programming language ever had, they use one well definied syntax and no ambigous mixup),
that just doesnt exist in v2.

v2 is from what I heard how autohotkey should always have been.
no legacy mode needed here, but this other command only accepts stuff in expression mode.

then you have to force switch modes with extra commands cause command 1 wants legacy while command 2 wants expression and you want to use one's output as input for the other.

that shouldnt exist in v2, from what i heard.

but surely autohotkey v2 isnt as extremely far spread as v1 and therefor good but jsut not too much used.
so not much help to expect and code samples to find I guess :-/

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 7 guests