Re: symbol resolution (was:EuCOM : Attn Matt : String Return Value)
- Posted by Igor Kachan <kinz at p?ter?ink.ru> Oct 15, 2007
- 896 views
Pete Lomax wrote: > BTW, I've still had zero entries to my data hiding challenge, > nor has anyone set a better one: > http://palacebuilders.pwp.blueyonder.co.uk/dhc.htm Hi Pete, Me wrote: --========== Date: 2007 Aug 21 9:30 From: Igor Kachan <kinz at ?eterlink.?u> Subject: Re: Data Hiding challenge Pete Lomax wrote: > > A while ago, CChris made a suggestion, erm about hosting stuff on my site I > think. Been busy. Anyway, here is a small starter: > > <a > href="http://palacebuilders.pwp.blueyonder.co.uk/dhc.htm">http://palacebuilders. pwp.blueyonder.co.uk/dhc.htm</a> > Ok, thanks. Now I do see what you really want. I think that the *private* and *local* symbols of Euphoria are hidden well enough, so the problem only stands for the *global* symbols. There are 2 the very powerful keywords in EU - *with* and *without*. I'd suggest the new parameters for these metacommands.
with namespace [file of the list or 1.0 or 2.3] or without symbol [list] So, the scheme is simple. You can just say about not needed globals, or to block them as hidden: without symbol abs, void, PI, arcsin, VOID, ABS include misc.e include new_sdl.e Or : with namespace my_project.en include win32lib.e include wmotor.e include wxeuphoria.e and then make the file my_project.en -- my_project.en without symbol abs, void, PI, arcsin, VOID, ABS, misc2.e/abs, misc3.e/ABS, c:/euphoria/include/my_libs/my_misc5.e/VOID, ........ ........ -- eof .en stands for Euphoria Namespace Or: with namespace 1.0 -- for the initial plain namespace Or: with namespace 2.3 -- for the current namespace
Just my $0.02 for now. I'm sorry, my spare time is very limited now, maybe in wintertime I'll have more possibilities for implementation of this idea. It seems to me, such a system can be very flexible without any new keywords in Euphoria, and is clear, for me at least. --=========== I think the problem is that we can *include* some global symbols using the 'include' key word, but can not *exclude* them using also some special key word, which makes the *excluded* global symbols, listed somewhere, 'hidden', so to say. So I suggested to use the known EU key words, namely 'with' and 'without' just to *exclude* the not needed global symbols of some library. That may be, for example:
include win32lib.ew without symbol [list] -- or just: include win32lib.ew without [list]
I do not like all these complicated rules with trees, tables of priority etc etc, I just can not remember who is who in those tables and trees, I'm just old and lazy. All *excluded* global symbols must be *listed* in separate special list to see them in program text without any dificulties. So we can have three mechanisms for name spaces in EU -- includeing, excludeing and renameing (include ... as). Again, just my $0.02, but I'd like to see some comments this time Regards, Igor Kachan kinz at peterlink.ru