Re: Namespace Qualifiers
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Mar 11, 2003
- 582 views
On Sun, 9 Mar 2003 10:51:03 +1100, Derek Parnell <ddparnell at bigpond.com> wrote: >You can't. Euphoria's namespace concept does not help us in this = situation. > >I would reason that because win32lib does NOT include win_misc.ew, = either >explicitly or implicitly, that the 'or_all' that win32lib is referring = to is >the one in tk_maths.e, which win32lib DOES include. Why Euphoria thinks = that >win32lib might be trying to refer to a version of a routine that it had = no >knowledge of is weird. > >What I need to do is to put namespace qualifiers on every routine that >win32lib references. There must be only a few thousand of those.... So what is the "proper" solution then? a) change std Eu to automagically resolve duplicate globals based on=20 include level; an included file referencing an included global it has itself included clearly means that one and no other. b) get smart; the or_all routine in tk_maths.e and the one in=20 win_misc.ew are nothing if not identical; they should resolve to=20 the exact same bytecode. Better than moaning about a conflict,=20 the interpreter should just take the first; the binder/translator optimise the second out of existence. c) extend namespace references somehow at the top level to state that I=20 mean the "or_all" sub-included by file x rather than the one=20 sub-included by file y? Pete