Deduction of our most important members is really below any level this time, including author.
I think most would agree that plugins are a "best of breed" feature in terms of their potential seamlessness and professionalism. I contend that plugins are a superset of pre-processing; in other words, #PP might overlap too heavily with plugins.
Preprocesor has nothing to do with plugins. Its entirely different topic.
Preprocesor is there to solve syntax problems, plugins are there to solve functionality problems. There is not any set relation betwen those two, except that cross-section is empty.
First problem I see: you create a dependency to an external file.
No you don't. Users that want PP create it, those that don't use it don't. If you want PP, then you know what it does, and you can live with additional dll.
With this idea, you will need to download some DLL to execute a given script, a DLL which might be different from the 10 others I already have... And when you distribute a script, you need to provide the DLL as well.
OMG ???
If you create window that have icons, you have to distrubute icons right ?
And those 10 icons you downloaded are different then all 100 you have now ? :lol:
Plese Philho, get serious.
Very impractical.
PPL are allready using other impractical dlls.... :roll:
I'm a bit confused by the reasons given so far about why this shouldn't be added. It seems the main reason is that this might cause people to alter the language. Isn't that the point of creating a module/plug-in to begin with?
Not only that. The problem here is lack of imagination and appropriate argumentation (which is indeed hard, as drawbacks don't exist, up to the design & implementation time)
Also, this is already possible. I'm simply asking to make it easier/more convenient.
Everything is possilbe now to do up to some level.
The point here is do you want to work like a man, or work like a n00b. If you work like a man, than reliablility, performance and simplicity is the goal, something we generaly can't do now without impacting one of the 3 goals we have as serious developers. I don't remember (in time that I visit this forum) any of the ppl showing here to create any more complex self contained addons for AHK, except corrupt and me. If you have looked the code and various workarounds we do as of missing ahk elements you would know there are bunch of problems.
Laszlo is in short code camp, so it is contrary to his definition.
Philho provides useful things, but they are either functions of specific domain - those that do something with input so don't require more isolation then those provided by function body - or not self contained.
Oh well, I'll do it the longer way ...or bite the bullet and work on compiling AutoHotkey in a different version of VS (express probably) and make the necessary changes.
After a year here, it appears that code-branch is the only solution to make AutoHotKey shine (by other name).
Well, that's the advantage of a preprocessor in exe form instead of a DLL: you can write a script the way you want, run the preprocessor on it, and distribute the pure AHK code, as is or compiled.
Exe or DLL are just different interfaces for the same thing, one to be more convenient then another in some situations. I don't care which will be, dll, or exe. I used exe so far in other languages but they has nothing to do with AHK specific usage and syntax. About problems with viewing produced AHK code that can be easily obtained with DLL too, with appropriate option like
corrupt already concluded.
Even if #PP were already coded, there's also the issue of whether it should even be included in the main distribution.
You can always maintain single project with some compiling flags to produce version that will omit or include #PP. Something ppl do for years with ansi/unicode.
It's great that you bring that up because it makes me realize how much more I want preprocessor macros than I do #PP. In fact, preprocessor macros might be able to do almost everything #PP can do, without the need to know/learn how to create a DLL.
I agree that macros are more generaly useful to broader range of ahk population. Its what i called #define and gave the examples in the Wish list. It is not only convinient but it will solve some performance problems.
But again, macros are really small subset of PP. Macro is genearly used to influence local environment, PP is used to influence entire script. Many thigns can be solved with PP that can't be solved with macro.
For instance, specifying functions where we can specify only subroutines (one ugly uspect of AHK) now, like in this code:
Gui, Add, Button, [color=green]g[/color]OnButtonClick
can not be change by any macro to support functions in format
Gui, Add, Button, [color=green]f[/color]OnButtonClick
This can be solved transparently by PP that will search for extended syntax elements and do code changes on various places. In this case, it has to produce following code:
Input:
Gui, Add, Button, fOnButtonClick
OnButtonClick( ctrl ) {
Msgbox Button %ctrl% clicked
}
Output:
[color=green]Gui, Add, Button, g_OnButtonClick[/color]
OnButtonClick( ctrl ) {
Msgbox Button %ctrl% clicked
}
[color=green]_OnButtonClick:
OnButtonClik( A_GuiControl )
return[/color]
Doing the same thing with macros is probably possible but then you will end up like some of the notorious frameworks having mambo-jumbo macros where preprocesor had to enter the job (MFC?)