Re: A Problem with v2.4 (for Rob)

new topic     » goto parent     » topic index » view thread      » older message » newer message

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 blink).
> 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.

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 ...
we are in complete agreement on this part, it would seem.

> 
> Best regards,
>    Juergen
> 
> -- 
>  /"\  ASCII ribbon campain  |    |\      _,,,---,,_
>  \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
>   X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
>  / \  and unneeded MIME     |  '---''(_/--'  `-'\_)
> 

jbrown

-- 
 /"\  ASCII ribbon              | http://www.geocities.com/jbrown1050/
 \ /  campain against           | Linux User:190064
  X   HTML in e-mail and        | Linux Machine:84163
 /*\  news, and unneeded MIME   |

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu