Opened 4 years ago

Closed 4 years ago

#3752 closed Feature Request (Rejected)

Making mod() an infix operator

Reported by: Robinson1 <Djamana@…> Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: infix mod BitAND BitOR BitXOR BitXOR BitShift BitRotate Cc:


That ticket is about the AutoIT Language parser.

In short:


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
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

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by TicketCleanup

  • Version deleted

Automatic ticket cleanup.

comment:2 Changed 4 years ago by Melba23

  • Resolution set to Rejected
  • Status changed from new to closed

There are other much more pressing things to occupy what little Dev time is available. The current operators work perfectly well - different languages have different syntax and coders must adapt.


Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.