Re: multi OS support
- Posted by Robert Craig <rds at ATTCANADA.NET> Sep 26, 1999
- 353 views
Ralf writes: > Couldn't you internally have the platform () function handled > as a constant (if statements based on the platform function > can be short-circuited, btw) .. wouldn't that be better > than adding another *global* constant ? (also because it > uses the same name, it can be a little confusing) .. just wondering. Rob Craig wrote: >> [In Euphoria for Linux 2.2 beta (coming soon), >> I've added a PLATFORM constant, >> that you can use instead of platform() - it's faster.] I agree that it's not nice to have both platform() and PLATFORM as global symbols in misc.e. I should really have defined PLATFORM (alone) as a global constant right from the start. I'll look into optimizing calls to platform() into constant values (1,2, or 3). It's not completely trivial, since you might edit misc.e and change what platform() does, or you might create your own platform() routine that does something completely different. It would be wrong to blindly replace all calls to "platform()" with a constant. Eventually, I'll try to do a proper job of in-lining of small routines, but for now a special case optimization for platform() will let us avoid adding another global symbol (that can never be removed). Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com