Hope => operator can support return unset Topic is solved

Discuss the future of the AutoHotkey language
User avatar
V2User
Posts: 195
Joined: 30 Apr 2021, 04:04

Hope => operator can support return unset

15 Dec 2022, 02:08

@Lexicos Hope => operator can return unset too when f(){} function define could support return unset.
It's merely a small hope. As you have said, you may add support for functions to return unset by default instead of a "" when what to return is not specified. Also, the v2 plugin for VSCode can aready examine it. So, I hope the same would apply to => too at that time.
For example, ()=>unset, a function just to make codes run in some situations if it has no specific alternative temporarily.
lexikos
Posts: 9666
Joined: 30 Sep 2013, 04:07
Contact:

Re: Hope => operator can support return unset  Topic is solved

15 Dec 2022, 03:03

=> expr creates a function body literally equivalent to return expr, as ListLines shows. There is no reason for => unset to be unsupported if return unset is supported.
User avatar
V2User
Posts: 195
Joined: 30 Apr 2021, 04:04

Re: Hope => operator can support return unset

15 Dec 2022, 07:22

@Lexicos That's hears great. It would be better if true?Unset:1 could also be supported at the same time, only when true?Unset:1 is behind return/=>, just like what happened to Unset.

Return to “AutoHotkey Development”

Who is online

Users browsing this forum: No registered users and 3 guests