Re: A better way to do this?
- Posted by D. Newhall <derek_newhall at yahoo.com> Feb 26, 2005
- 441 views
Al Getz wrote: > > This is one of the reasons i was pushing for "re-includes"... > that is, you can include a file several times in the same ew file > and each time it creates a separate 'instance' of that include file. > Like: > include MyList.ew as ML1 > include MyList.ew as ML2 > > now you have two lists: > ML1:MyList > and > ML2:MyList > so depending on which list you want to read/write to, you > just use that one's name space qualifier, ML1 or ML2 in this case. > > Without that feature, you could copy the file MyList.ew and past it > and rename it to MyList1.ew and the copy as MyList2.ew and include them > both like: > include MyList1.ew as ML1 > include MyList2.ew as ML2 > > You then end up with the same functionality. Wow, I always assumed that was how Euphoria did things since in my tests building libraries to handle data structures it seemed to work (turns out I was calling the functions in such an order that it seemed to match up). Now, however, I find that it isn't like this. Well, that REALLY sucks. I guess I'm now going to have to rescind my statement on Euphoria's include statement being decent enough to do what you need. Without re-includes I can't do 70% of the projects I have planned but haven't gotten around to implementing yet. Also, I tried changing the path of the include to see if it'd load in the two DIFFERENT include files (test.e and test_dir\test.e) but sadly it didn't do that either killing off any hope of implementing many of my projects. Seriously Rob, you really, REALLY need to do something addressing these include/namespace issues that everyone keeps bringing up. Now I really love Euphoria (it's practically the best language ever) but in light of these glaring flaws in handling modularity I don't see a reason to keep Euphoria on my computer since I can't make managable and well-defined programs using the way the include statement is implemented now. Please, please, PLEASE try to adress some of these issues because I don't want to stop using this lovely language.