﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3752	Making mod() an infix operator	Robinson1 <Djamana@…>		"That ticket is about the AutoIT Language parser.
=== In short: ===
Concerning: 
    '''Mod''' ''as well as''
    '''BitAND, BitOR, BitXOR, BitXOR, 
    BitShift, BitRotate'''

What if:

{{{
$result = 3 mod 2
}}}

works as well as 

{{{
$result = Mod(3,2)
}}}

currently does.

=== In more detail ===
the idea of this ticket is to propose to also have for function/operators BitAND, BitOR, BitXOR, BitXOR, BitShift, BitRotate and Mod also an '''infix''' version?

... like it is in most other common programming languages it is.
For example JavaScript:
{{{
Result = Value & Mask
}}}

=== And vs BitAnd() ===
Concerning this the situation in AutoIT is at the moment a little 
'unique'. 
While the '''logical And''' is indeed infix:

{{{
$bIsEnable = $bIsGUI_chkEnabled and $bIsGUI_chkChecked
}}}

for the Bitwise pendant '''BitAnd''' it is not:

{{{
$Result = BitAND ( $Value , $Mask )
}}}

(Instead it's a prefix operator - like most the other functions)

So I wonder why it is like this.
Question 1:
 What is the idea about this language design decision?  

Okay Autoit is a matured Language but yeah 
it's never to late for a change.

Question 2:
Wasn't there any tries to unify that before?

So what about also making the 'Bit' operations infix as well.
... while of course keeping the 'old' prefix version 
-for backwards compatibility - .
It won't break anything, but in my eyes is a big improvement regarding style and intuitivity of Autoit.

=== Linked Forum Topic === 
https://autoitscript.com/forum/topic/202303-autoit-language-why-bitand-is-not-an-infix-statemen"	Feature Request	closed		AutoIt		None	Rejected	infix mod BitAND BitOR BitXOR BitXOR BitShift BitRotate	
