-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Left-associativity hint for the exponentiation operator. #369
Conversation
There is a mention in the docs,
If this operator was an exception, it would be mentioned. That being said, it is not uncommon for exponentiation in infix notation to be right-associative, as it is in superscript notation. So I think your suggestion is reasonable 👍 . Cheers. |
Indeed, there is. Still, I think an explicit reminder would constitute a worthwhile addition, despite the duplication issues that would arise. |
There are unrelated changes in your pull request that you have not mentioned. This is poor form, even if the changes are trivial and acceptable. This applies to all versions of AutoHotkey, so why is this PR targeting the v2 branch? Would it not be better to change the behaviour in v2 and then document right-associativity? As far as I can find in the source code, backward-compatibility is the only reason left-associativity is kept. Changing this is a trivial matter of adding 1 to the SYM_POWER entry in the sPrecedence array. |
I hadn't thought about switching That said, I am also open to leaving the operator as is, so long as something is added to the operator's description to tip off users about this apparent peculiarity. The PR is targeting the v2 branch, because that is the version I use exclusively. As far as I can tell, clicking the Pen (Edit) prompts you to merge into v2. I simply mimicked that. If there are any guidelines in place dictating how documentation contributions are to be made, point me towards them and I'll make sure to abide by them next time. It seems the unrelated changes consisted of a trailing space that my editor must have gobbled up and a hyperlink I've added. I could revert those if you want me to. |
Supersedes #369 Behaviour to be changed in v2.0-a113
Implemented by AutoHotkey/AutoHotkey@1e59d6fa Closes #369
Looks like Chris anticipated a change in behaviour:
|
Lost some time debugging otherwise valid code because I assumed it was right-associative.