Re: A Problem with v2.4 (for Rob)
- Posted by Juergen Luethje <j.lue at gmx.de> May 20, 2003
- 410 views
Hello Jim, you wrote: > On Mon, May 19, 2003 at 04:45:50PM +0200, Juergen Luethje wrote: >> >> Hello Jim, you wrote: >> >>> In my namespace parser, when looking for "DoSomething", it would first look >>> at the local routines, then the global ones. If still no match, then it >>> would >>> look at the namespaces, one-by-one, (in the order they were created) until >>> it >>> found a match. If no match was found then it raised an error. >>> >>> Note that my parser didn't raise an error if there were _2_ DoSomeThing's, >>> since >>> it stopped after it had found _1_. >>> >>> That is arguably a flaw, but perhaps not. >> >> All this namespace stuff is quite hairy (at least for my brain 1.0 ). >> If there was a naming conflict because of 2 or more routines or >> variables with the same name in the same scope, I'd like the interpreter >> to raise an error rather than ignore all but the one it found first, for >> the sake of safety. >> > > A better approach, for the interactive preparser, would be to show all the > routines in all the namespaces, and ask the user which one to use. That sounds nice. > For the interpreter (or noninteractive preparser), flag an error, and abort. > I'd feel, tho, that the interpreter should flag a warning instead of an error. > > <snip> >>> On Sun, May 18, 2003 at 06:57:52PM +0200, Juergen Luethje wrote: >> >> <big snip> >> >>>> But using >>>> include file1.e >>>> include file2.e as i2 >>>> include file3.e as i3 >>>> >>>> should work, because any file has an unambiguous namespace. file1.e has >>>> the namespace "" which is not nothing. Eu IMHO should be able to handle >>>> that. >> >> My point is, that -- from a logical point of view -- here is no naming >> conflict at all, and I wish that this fact would be realized by Euphoria. > > As do I. I did mention, that my namespace parser DOES recognize this fact ... I must have missed that, sorry! This namespace stuff is almost driving me crazy. > we are in complete agreement on this part, it would seem. > > jbrown Best regards, Juergen -- /"\ ASCII ribbon campain | Everything should be made as simple \ / against HTML in | as possible, but not simpler. X e-mail and news, | / \ and unneeded MIME | http://www.sfheart.com/einstein.html