Re: Store Includes
- Posted by Al Getz <Xaxo at aol.com> Jul 18, 2005
- 509 views
DB James wrote: > > Al Getz wrote: > > > > DB James wrote: > > > > > > Hi all, > <snip> > > > A last point: you might want to take a look at the program for one > > > particular > > > feature: it has no include files of its own. All necessary components are > > > within one file. This was done by means of two programs I'll be posting > > > soon: IncAll.ex and Mash.ex. These create a large file of all files, then > > > strip out all unused items. You will perhaps smile when I confess the > > > impetus behind these: I use personal include files I don't want to inflict > > > on anyone I don't hate :^D There are things with tentacles in there! By > > > "mashing" the files, the world only sees what works (more or less). More > > > seriously, there might be times when it would be useful to send someone > > > who is not an Eu person just two files: the PD interpreter and the program > > > itself. > > > > > > Over, > > > > > > --Quark > > > > > > > Hi there, > > > > Sounds interesting...im just wondering now... > > does it work with Euphoria's name space feature too? > > > > > > Take care, > > Al > > Hi Al, > > I assume it was that last paragraph that you were responding to. As all > includes are mashed with the original program into the same file, there > are no includes and no global variables. There can be no duplicated > items either of any kind. The programmer must fix all duplicate names. > > In a sense, all namespace issues seem to come down to nullifying > duplicate names somehow. With mashing, it is simply explicit -- NO > duplicate names. However, in fixing these duplicate names, there > is no effect on existing libraries as they are not involved -- > only the items in the mashed file. > > Your question has made me rethink how to handle this problem -- > I'll change the action of mash.ex to warn the programmer of all duplicates > and let that person do the (usually) few fixes of the mashed code. > > Was all that to the point of your question, Al? > > --Quark > Hi Quark, Actually, my question was a little more general, but what you are talking about is good to think about too. All i really wanted to know was this: Can you send your program a program file set that uses Euphoria's namespace feature and have it create a lumped program file with no namespace prefixes that runs the same as the original set of files? I guess ideally you could also make an exw: include this.e include that.e include thisothertoo.e and send it to your program to create a single file library right? When you say duplicate names, you mean two names like this: Window:Create(...) MyThing:Create(...) where the 'Create's occur in different files? Or do you mean something else? Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"