Re: Load User module
- Posted by Kat <kat at kogeijin.com> Nov 08, 2002
- 373 views
On 8 Nov 2002, at 7:09, kbochert at copper.net wrote: > > Hi Derek Parnell, you wrote on 11/8/02 5:26:38 AM: > > > > >Robert, > >is this the sort of thing you are suggesting for us ? ... > > > >include linux/ui.e as lui > >include win32/ui.e as wui > >include dos/ui.e as dui > >. > >. > >. > > How about a few more keywords--- > > Linux_include linux/ui.e > Win32_include win/ui.e > Dos32_include dos/ui.e > > ... > > There could even be a User-defined platform: > > if ... then > User = TRUE > endif > > User_include conditional/code.e > > To get really extreme, 'conditional/code.e' could modify > the 'User' variable and therby control further includes. I have a simpler suggestion (rather like goto replaces all jumps by other names): dynamic loading/unloading. Like in mirc (the toy non-language that's extremely versatile). It seems to me one of the strengths of an interpreted language is you *can* point the core of the interpreter at anything and say "run this script", be it a variable or a new include file. And if you can point it to a new include file, the an unload command becomes useful too, and since all this loading/unloading is going on, the $isalias() to peek into the interpreter's table of what is currently loaded will be useful too. And if you have functions by the same name in more than one include file, they are executed in order of loading. And you can do loading at any point in the program flow. Same for events. Simple, no? You are the programmer, you tell the language how to do the job, the interpreter shouldn't be fighting you over it. Kat