RE: [RC] Lucius tries to use namespace

new topic     » goto parent     » topic index » view thread      » older message » newer message

Matt Lewis wrote:
>  
> I think you missed Irv's point.  The current namespacing issue 
> helps us as
> long as we're only concerned about include files one level down...
> 
> Matt Lewis
> 

I see what you mean.  You're looking to inherit namespaces
from other includes.  This sounds pretty good.  Im not sure
if i want to make my libs users have to type more then one
namespace prefix, but if the include could inherit the prefixes
verbatim that might also take care of that too...

inherit LargeLib.ew

xx:GetStuff() -- xx was a namespace prefix in LargeLib.ew

--LargeLib.ew:
--------------------------------------------------------------
    include GetThings.ew as xx --has the GetStuff() function.
    include GetOtherThings.ew as xy    
--------------------------------------------------------------

I guess this would take some thought, and there would have to
be a way to eliminate some namespaces too, or override them.


For now, each namespace has to be typed in each file that
you intend to use the class in:

include SLEdit.ew as SLE

has to appear in each file it's true, but that isnt very hard
because once you type in your first list of most of the classes,
you copy/paste the list into the new file.  You then delete
what you dont want to use in that file.

If you look at any kind of includes in Euphoria you'll find that the
includes couldnt dig down into subdirectories either smile
which also bugged me a little.  Perhaps we need to be able to
include a whole directory too...

include "c:\Euphoria\MyIncludes\"

or a file that was included will look into it's current directories
for files too...

include c:\Euphoria\Include\MyLib\Lib1.ew

where Lib1.ew has includes also residing in the MyLib directory.



Generally speaking, the namespace feature makes the language
a little more complex, and so there are certainly going to be
people who dont like using it, at least until they decide to
learn the best way to deal with it.  On the plus side, complexity
usually leads to increased functionality, and i believe that the
namespace feature in Euphoria has increased it's basic functionality
by 1000 percent, even the way it stands now.  This means that
if those same people decide to learn to use the namespace feature
to at least some degree they will find the language can work
better for them in the long run.


I hope to write more on this soon too...

Take care for now,
Al

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu