1. [RC] Lucius tries to use namespace
- Posted by Lucius Hilley <l3euphoria at bellsouth.net> Jun 24, 2003
- 457 views
This is a multi-part message in MIME format. ------=____1056485045481_B=-d'.XuQh Ok, I'll start with an insult. Robert Craig, Bite me. I tried to make use of namespacing. I had beautiful results while testing from within the include file that I was creating. I made a nice little wrapper for somebody elses routine calls. I then decided to inlclude my wrapper and use the new routines that I had made. That had exact same names as the file they wrapped. Guess what. I can't use my routines without saying blah:routine() for every freaking one of them. In short, I tried your NameSpaces and hate it. I, Lucius L. Hilley III, aka. Unkmar, Hate your NameSpace dealio. Lucius L. Hilley III - Unkmar ------=____1056485045481_B=-d'.XuQh
2. Re: [RC] Lucius tries to use namespace
- Posted by gertie at visionsix.com Jun 24, 2003
- 450 views
On 24 Jun 2003, at 16:04, Lucius Hilley wrote: > > Ok, I'll start with an insult. > Robert Craig, Bite me. Can someone PLEASE tell me what that means?? No one has ever clued me in why YOU being bit is an insult to THEM. And why would they bite you anyhow? Kat
3. Re: [RC] Lucius tries to use namespace
- Posted by "C. K. Lester" <cklester at yahoo.com> Jun 24, 2003
- 433 views
Kat mused: > > Ok, I'll start with an insult. > > Robert Craig, Bite me. > > Can someone PLEASE tell me what that means?? No one has ever clued > me in why YOU being bit is an insult to THEM. And why would they bite you > anyhow? http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=why+is+%22bite+me%22+ an+insult%3F
4. Re: [RC] Lucius tries to use namespace
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 24, 2003
- 439 views
----- Original Message ----- From: "Lucius Hilley" <l3euphoria at bellsouth.net> To: "EUforum" <EUforum at topica.com> Subject: [RC] Lucius tries to use namespace > > Ok, I'll start with an insult. > Robert Craig, Bite me. > > I tried to make use of namespacing. I had beautiful results while testing from > within the include file that I was creating. I made a nice little wrapper for > somebody elses routine calls. I then decided to inlclude my wrapper and use the > new routines that I had made. That had exact same names as the file they wrapped. > Guess what. I can't use my routines without saying blah:routine() for every > freaking one of them. > > In short, I tried your NameSpaces and hate it. Okay, I'll bite So we now have a situation where there are two global routines called 'xyz' and a program using your wrapper include decides to call a routine called 'xyz'. Now how is Euphoria supposed to know which of those two 'xyz' routines is meant to be called? This is why you need to tell EUphoria which one you are referring to. Is Euphoria suuposed to guess and use the one that was most recently defined? Is that what you were expecting? That behaviour could lead to mistakes being made by Euphoria. On a related issue, the rule of thumb when writing library files is... If you are writting a file that will be 'included', then every reference your file makes to globals that are in files that your file includes, needs a namespace qualifier. For example, I'm writing a file call supersort.e, and it includes the RDS sort.e file. This means that every time my supersort.e code refers to a global in sort.e, that reference needs a namespace qualifier. include sort.e as rdsSort include wildcard.e as rdsWildcard . . . result = rdsSort:sort( rdsWildcard:lower(x) ) -- Derek
5. Re: [RC] Lucius tries to use namespace
- Posted by gertie at visionsix.com Jun 24, 2003
- 446 views
On 24 Jun 2003, at 16:52, C. K. Lester wrote: > > > Kat mused: > > > > Ok, I'll start with an insult. > > > Robert Craig, Bite me. > > > > Can someone PLEASE tell me what that means?? No one has ever clued > > me in why YOU being bit is an insult to THEM. And why would they bite you > > anyhow? > > http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=why+is+%22bite+me%22+ > an+insult%3F I didn't ask for a list of more nonsensical insults, bad grammar, and misspellings, i asked what that one alledged insult means! Google dropped three of those words, so you couldn't have copied me an url with the meaning on it. Kat
6. Re: [RC] Lucius tries to use namespace
- Posted by Guillermo Bonvehi <knixeur at speedy.com.ar> Jun 25, 2003
- 442 views
Hi Lucius, I think what you want is a kind with BLAH do end with feature, so=20 you avoid writting the namespace if you call a lot of functions. Best Regards, Guillermo Bonveh=ED Lucius Hilley wrote: > >Ok, I'll start with an insult. >Robert Craig, Bite me. > >I tried to make use of namespacing. I had beautiful results while testing= from >within the include file that I was creating. I made a nice little wrapper= for >somebody elses routine calls. I then decided to inlclude my wrapper and u= se the >new routines that I had made. That had exact same names as the file they = wrapped. >Guess what. I can't use my routines without saying blah:routine() for eve= ry >freaking one of them. > > In short, I tried your NameSpaces and hate it. > I, Lucius L. Hilley III, aka. Unkmar, Hate your NameSpace dealio. > > Lucius L. Hilley III - Unkmar >=20=20 >
7. Re: [RC] Lucius tries to use namespace
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 25, 2003
- 470 views
On Tue, 24 Jun 2003 22:48:25 -0300 (06/25/03 11:48:25) , Guillermo Bonvehi <knixeur at speedy.com.ar> wrote: > > > Hi Lucius, > I think what you want is a kind with BLAH do end with feature, so=20 > you avoid writting the namespace if you call a lot of functions. > I was thinking about this (in the shower this morning - where all the best thinking happens) and although its a rare requirement, it is legitimate to want to override a previously declared routine with a replacement one. OO languages do this sort of thing all the time with overloading. So maybe a specific syntax is required to tell Euphoria what we are doing. For example, in my new library file I could write ... include original.e as org override procedure org:xyz( ... ) . . . end procedure Then when somebody include my library and they write "xyz(...)" Euphoria now knows to call my version of xyz and not the one in original.e. If the person specifically wants the original version they would specifically use it. include mylib.e as new include original.e as original original:xyz(...) new:xyz( . . .) -- cheers, Derek Parnell
8. Re: [RC] Lucius tries to use namespace
- Posted by David Cuny <dcuny at LANSET.COM> Jun 25, 2003
- 433 views
Kat wrote: > Can someone PLEASE tell me what that means?? No one has ever clued > me in why YOU being bit is an insult to THEM. And why would they bite > you anyhow? Rather than offend young ears (and trigger the filtering software), I'll just post this link: http://phrases.shu.ac.uk/bulletin_board/8/messages/213.html If this doesn't raise any purient interest, I don't know what will. -- David Cuny
9. Re: [RC] Lucius tries to use namespace
- Posted by irvm at ellijay.com Jun 25, 2003
- 434 views
Lucius, in all his subtlety, is just saying what anyone who has taken a close look at 'namespaces' must be thinking. I had hoped that Rob would come up with a brilliant, (and perhaps uexpected) solution to the namespace problem. He sometimes does that sort of thing. What we got instead was more like a band-aid for a broken leg - while it might be needed, it's also completely inadequate. The problem is not, however, as Lucius stated: that you must prefix each namespaced variable/function. That is a minor annoyance, and would have been even less of a problem if Rob had listened to the numerous suggestions that he implement something along the lines of Pascal's 'with .... do' statement. The real problem is that namespacing is braindead. Let's look at a real-life example: In GTK, there are many controls which have similarly but logically named functions, for example: get_text(). Some of these functions take different parameters than others. To write a program using GTK, I have a choice: Option 1: I can specifically 'include ... as ..." each individual GTK control from its own Eu include file. That makes 124 lines of "include ... as" at the top of each program for any program which uses more than a few controls. Get real - this entre post is only about 100 lines long. Do you really want that much prelude to each of your programs? Option 2: I could write a wrapper for all these includes, and just put a single line: "include wrapper" at the top of each new program. A much better solution, right? Wrong. ** While in the wrapper, each include has its own identity (the name I chose when "including .. as"). For example: include entry.e as entry include textbox.e as textbox This eliminates name collisions inside the wrapper, because I can refer to "entry:set_text()" or "textbox:set_text()". But what happens when I try to access these functions from my main program (the one which just 'include(s) wrapper') ? I get an error message telling me that: A namespace qualifier is needed to resolve set_text. set_text is defined as a global symbol in: entry.e textbox.e textedit.e label.e button.e ....etc So Euphoria knows there are several versions of "set_text()" out there, and even which files they are found in, even though I did not specifically "include" ANY of those files in my main program. Cool. So I'll just qualify the function, right? entry:set_text("Hello World") Wrong again! entry has not been declared. How does Eu know where all these "set_text()" functions are located? It got that info from the "wrapper", where they _were_ included, obviously. --------------- Q: If Eu can pass on the names of included files, as well as the names of all the globals in those files, why can't it also pass on the namespace qualifiers given to those files? Ans: Braindead. --------------- OK, Rob will say namespacing wasn't designed for that purpose, but only to make it easier to include libraries written by other people. Perhaps he will explain how using a library from someone else differs from using the identical library written by oneself. ** note: I managed to work around that problem, but the solution sure didn't involve using namespaces. It would have been *much* simpler if proper namespacing had been implemented. Irv
10. Re: [RC] Lucius tries to use namespace
- Posted by gertie at visionsix.com Jun 25, 2003
- 440 views
On 24 Jun 2003, at 14:38, David Cuny wrote: > > > Kat wrote: > > > Can someone PLEASE tell me what that means?? No one has ever clued > > me in why YOU being bit is an insult to THEM. And why would they bite > > you anyhow? > > Rather than offend young ears (and trigger the filtering software), I'll just > post this link: > > http://phrases.shu.ac.uk/bulletin_board/8/messages/213.html > > If this doesn't raise any purient interest, I don't know what will. So Lucius doesn't really want to be bit anywhere, and (since it's not serious) nor does he have a "crush" on Rob, ok. But why the challenge on Rob's honor to do that? If doing that act is so honorable and desireable to Lucius, why is that a bad thing for one man to do unto another? And how is this related to programming? Kat, thinking men are still strange beings.
11. Re: [RC] Lucius tries to use namespace
- Posted by Greg Haberek <g.haberek at comcast.net> Jun 25, 2003
- 476 views
Just to put in my two cents here, but I think any include file given a namespace which is not at the top level (i.e. buried somewhere in another file) should be *ignored* at the top level. by this, i mean include files with namespaces should only be local to the file calling them. so if I do this: include file1.ew -- available to all include file2.ew as f2 -- available to this file only then I can access the global routines from file1.ew anywhere I want, but file2.ew routines will only be available to the file including file2.ew. this way, if I do include file2.ew in my top-level program, or somewhere else, I won't run into namespace issues. ~Greg g.haberek at comcast.net
12. Re: [RC] Lucius tries to use namespace
- Posted by Lucius Hilley <l3euphoria at bellsouth.net> Jun 25, 2003
- 450 views
You can all say and do what you want. But at this point, I simply refuse to use Euphoria's name space. It is more of a headache than a solution. it is a way of saying. include file.e as not_global