Re: win32lib 0.70+ and Euphoria 3.0-
- Posted by CChris <christian.cuvier at agricult?re.gou?.fr> Jan 16, 2008
- 533 views
Matt Lewis wrote: > > CChris wrote: > > > > 1b/ Declare that, from v0.70.1 on, win32lib is compatible with the version > > of Euphoria that is officially available at release time. This will allow > > $, task_yield(), find_from(), match_from() in, as well as anything that > > might come in the future. This one would have my vote. > > Join the 21st Century! I vote for 1b. I think that it makes sense to use > the full capabilities of the language. If there is interest, someone could > maintain a backwards compatible branch of the code. I know there are a few > > die hards out there who still use older versions, but I think that there are > some really nice improvements that have been made since then that make it > easier/nicer to code in euphoria. > Unfortunately, it is not always that simple, because there are regressions in Euphoria. The most obvious one is that, under 2.4 and earlier, you could define at run time the contents of a file to be included, which was a way to implement dynamic code. A little unwieldy at times, but it worked. This feature disappeared with 2.5. Try defining the contents of a file before including it: this is legal, but the file has been read and parsed before the statements that set its contents are executed. Hence you need two Eu programs, one to set the file contents and then the main program. And it gets messier if the two processes need to exchange information. A typical application is when include files are different depending on some hardware/OS configurartion, and the main program also needs the info. Again, it can be done using editor scripts to update the main program before running it, but this is definitely harder than the previous way. CChris > I haven't dabbled in win32lib in some time, but I wouldn't be surprised to > find that there were some good uses for the new peek/poke routines. > > Matt