Re: symbol resolution (was:EuCOM : Attn Matt : String Return Value)
- Posted by Pete Lomax <petelomax at blueyonde?.?o.uk> Oct 12, 2007
- 895 views
Matt Lewis wrote: > > I wonder if we're talking past each other? I'll adopt your example from > above: > > }}} <eucode> > app.ex > include main.e main.e > global Z > include libAmisc.e > if Z then > include libA.e > global Z > include libAmisc.e > if Z then > ? Z -- back in app.ex > </eucode> {{{ > > I was talking about how to resolve Z. I'd say that an unqualified Z in > this instance should get you main:Z. No, I'm really not getting this. Blindly assuming it is always the first Z just seems completely wrong to me. If I was struggling with some function in libA, and tried setting or printing Z, I'd be miffed enough when I finally found out about the Z in main.e. What if (an extra level of nesting and) I then did an "include libA as A" to force the issue, and it crapped on some previously working use of unqualified Z later on because of this rule? Just force the namespace qualifier. It is not as if this case happens very often. Regards, Pete > except for incV.exw Oh, there was a fix in 3.0.0 for that, quite safe to ignore it now.