Re: Include System (was Standardized Euphoria)
- Posted by Chris Bensler <bensler at nt.net> Dec 28, 2006
- 519 views
Pete Lomax wrote: > > On Mon, 25 Dec 2006 11:57:50 -0800, Chris Bensler <guest at RapidEuphoria.com> > wrote: > > >It's basically what I'm doing. > Yep, looks fine to me. > > >Yer saying that if foo/xxx.e is already included and I try to include > >bar/xxx.e which doesn't exist, it should default to foo/xxx.e like it > >did when using previous versions of Eu? > Nearly. > >I don't agree. I consider the previous behaviour to be broken. > When you say "bar/xxx.e", as opposed to just "xxx.e", and there is no such > file loaded from a subdirectory named bar, wherever that dir is, then I > agree, but imo when you just say "xxx.e" you imply you don't care where > it is, and of course the compiler will look in current_dir, EUINC, EUDIR, > and possibly a few other places as well for you. > > What I now (in Positive) have, and let's be honest not exactly difficult > to implement, is this: > }}} <eucode> > include test\t05\inc5\t2.e > --include t2.e -- OK > --include inc5\t2.e -- OK > --include c5\t2.e -- Bad > --include foo\t2.e -- Bad > </eucode> {{{ > > Another way to say this is: if your app uses libs from Chris and Dave, > which both use Bob's, correct organisation is Bob/Chris/Dave, not > Chris/Bob/Dave/Bob. > > The way things stand, if I try to put bob.e and associated paraphernalia > into bob\, then the "include bob.e" statements in chris.e and dave.e will > both crash. > > Regards, > Pete bob.e != bob\bob.e If we allow that, we create ambiguity when the programmer actually means he wants to include bob.e eventhough there is also a bob\bob.e What if I have bob\bob.e already and I want to move the file into the project folder? From what I understand, your solution only addresses the opposite circumstance. Chris Bensler ~ The difference between ordinary and extraordinary is that little extra ~ http://empire.iwireweb.com - Empire for Euphoria