| View previous topic :: View next topic |
| Author |
Message |
Tuncay
Joined: 07 Nov 2006 Posts: 384 Location: Berlin
|
Posted: Sun Apr 01, 2007 5:01 pm Post subject: Would make an AutoInclude library (stdlib.ini) any sense? |
|
|
| Would make an AutoInclude library (stdlib.ini) any sense? This could avoid the need of include often used and standardized libraries. And a new option "/lib file" at command line stage too. |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Sun Apr 01, 2007 8:20 pm Post subject: |
|
|
A standard library is already planned, but how do you figure a '/lib file' option would be more convenient than #Include directives?
And frankly, I don't think an "auto-include" would make sense. Could you explain more about what you think it could be used for? |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 384 Location: Berlin
|
Posted: Mon Apr 02, 2007 10:09 pm Post subject: |
|
|
I know about the standard library.
The user would not have to know in which file the function or subroutine reside.
Not to forget an new directive "#NoAutoInclude".
Note this is not a wish, just opened the thread for discussion. |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Tue Apr 03, 2007 1:32 am Post subject: |
|
|
| I still don't see what makes this a good thing. If they're going to be automatically included anyway, how is that different from them being built into the language? I think include files are better for functions that are less often used. |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2397
|
Posted: Tue Apr 03, 2007 6:42 am Post subject: |
|
|
| jonny wrote: | | I still don't see what makes this a good thing. If they're going to be automatically included anyway, how is that different from them being built into the language? I think include files are better for functions that are less often used. | I think that's the whole point. If functions could be automatically included when needed then user functions that haven't been built-in to AutoHotkey.exe can seem as if they are built-in. An entire library of functions doesn't necessarily need to be included. Specific functions that are referenced could be included only depending on how the lib and/or method of including functions is designed.
I'm not sure about the method suggested as it would require AutoHotkey to do most of the processing but I like the concept of automatically including functions from a lib file if they have been referenced and don't currently exist as functions within the code. |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 384 Location: Berlin
|
Posted: Tue Apr 03, 2007 8:36 pm Post subject: |
|
|
| jonny wrote: | | If they're going to be automatically included anyway, how is that different from them being built into the language? | Thats the difference.
But then every code in the stdlib.ahk would be included to all scripts and blow them up, even if not needed. |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Wed Apr 04, 2007 7:06 am Post subject: |
|
|
The idea of a command line switch to include a library is original and interesting, but not very practical. You say "Not to forget an new directive "#NoAutoInclude"", but then, if the switch is forgotten (which will be the case in runs by double click, drag'n'drop, context menu, etc.), the script won't work.
Plus either the library will be too small to be really useful, or too big to be practical to be included even on demand. A standard library should be modularized, with sections like DllCall-related functions, mathematical functions, string functions, and so on.
Anyway, there is at least another topic on this subject, so there is little point to discuss such details here. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
|