Re: Real world example of the includes-with-the-same-name "bug"
- Posted by Jason Gade <jaygade at yahoo.com> Jan 20, 2006
- 653 views
Vincent wrote: > > Jason Gade wrote: > > > This started working in one of the 2.5 alpha or beta interpreters, but he > > squashed > > it as soon as it was pointed out. > > It worked with Euphoria v2.4 and older when the foward slashes were used. > Robert > has changed it in 2.5 after a quick decision. I think he knew about it for > quite > awile but probably was reluctant to change it in fear of angering Chris > Bensler > and others. :P > > I think he changed it because the way it worked was by a glitch and wasn't > designed > to do that and only worked when using foward slashes and no quotes (no > absolute > paths). It was alot easier for Rob to fix it the normal than to go with the > proper solution. > > > He doesn't want the interpreter to work this way. > > And it wasn't designed for "internal simplicity". > > He didn't want to add code to resolve slashes, dots, etc. or build full paths > from relative and main path directories. I'm not sure what you mean here. Relative and absolute paths already work properly. They use the OS file routines which resolve this automatically, I believe. > > I think he would prefer the proper way, but just doesnt see it as a big enough > issue to warrent the extra hassle fixing it. I'll make it very simple for him. > All he needs to do is backup his scanner.e and replace it with mine. My > scanner.e > is based on the multi-tasking PD-source update. So there shouldn't be any > issues > unless he's modified his copy since then. If he did, it would be simple for > him to copy and paste his modified code into the my scanner.e or visa versa. > He can remove my comment tags if he likes. > > BTW... I was able to get the largest Win32Lib (IDE too), wxEuphoria, FluidAE, > etc. programs to load correctly, so that means everything is pretty dang > stable, > though I ran into a several bugs in the beginning but fixed them quickly. > > I want to refine the slash scanner a little more and maybe optimize the code > a little before release it (there is no noticable difference in loading time). > > > Regards, > Vincent I think we're talking about different things -- I'm not sure. I didn't think Euphoria had any problems with slashes and backslashes and dots. I just tested it and it worked as I expected. What I thought we were talking about is this: (from the manual) -- quote -- Other than possibly defining a new namespace identifier (see below), an include statement will be quietly ignored if a file with the same name (but possibly located in a different directory) has already been included. -- quote -- This is the behavior that is considered a 'bug' by almost everyone except Rob. *I* think that programs could be both more modular and/or more object-oriented if it worked as follows: * Quietly ignored if the *exact* same file is included twice without a namespace identifier * Treated as separate files if a namespace identifier *is* included * Treated as separate files if includes are in a different path * Give a warning and/or an error if there is a global symbol conflict and no namespace identifier in the above cases I think this is the major reason why Derek Parnell left -- it was considered a bug by Rob Craig and a great feature by almost everyone else. -- "The author regrets that he is unable to reconcile himself to the thoughtful point of view you have expressed. However, it must be kept in mind that being raised in different cultures and different places can result in such differences of viewpoint between individuals. The author is from planet Earth." [author unknown] j.