Look at what Kip has done with his preprocessor (and a history of others before him), the possibilities are seemingly endless. By creating a preprocessor for AutoIt (not the kind that simply improves execution speed), we can do more with the language than what is officially available to us. The question central to this thread is:
What cool and fun things can we do with AutoIt?
I'm always trying out new languages when I get an opportunity. With seeing more and more of other languages always comes envy of other language features. I am quite sure that anyone who reads this and knows another language will go "True, i've always wanted [...] in AutoIt". There are possible through a preprocessor which produces (even neatly looking) AutoIt code to reach this goal.
I've some simple ideas to get the thread started.
inspired by await
This can be compiled to:
The trick is to determine the right amount of sleep it needs automagically (it's a private implementation detail after all). Perhaps 100ms is a good default choice, but some will need to define it themselves.
Inline functions (maybe even called delegates)
Inspired by Lua inline functions.
How this works is that any time you use Func() it is replaced with a function name (as string), and the function statements are preprocessed into a new function with that name.