Re: Namespaces

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

Hi irv,

I never got around to trying Py, but it sounds similar.
I've had the need to include several instances of the same
file many times already.  I suggested this way back when,
but at the time hardly anyone was using the namespace feature.
It sounds like more people are finally using it now so issues
like this will keep comming up.  The results will be an improved
Euphoria, sooner or later.

Take care,
Al


irv mullins wrote:
> 
> 
> Al Getz wrote:
> 
> > Here's a summary of the namespace issues that should be addressed:
> > 
> > 1.  global namespace fix (Me and others)
> > 2.  inheritance or dynamic merge (Irv & Me)
> > 3.  multiple include instances (Me)
> 
> Oh, yeah - I forgot about the multiple-include idea. 
> You may remember Dave Cuny's "Py" language, which for a time 
> allowed code such as:
> <font color="#330033"></font>
> <font color="#0000FF">include </font><font color="#330033">mailinglist.e as
> customer</font>
> <font color="#0000FF">include </font><font color="#330033">mailinglist.e as
> supplier</font>
> <font color="#330033"></font>
> 
> resulting in two instances of mailinglist, each with their own 
> independent set of variables and functions. Very handy. You could write:
> <font color="#330033"></font>
> <font color="#330033">customer:file = </font><font
> color="#00A033">"customer.edb"</font>
> <font color="#330033">supplier:file = </font><font
> color="#00A033">"supplier.edb"</font>
> <font color="#330033">customer:add(</font><font color="#00A033">"Coyote,
> W"</font><font color="#330033">)</font>
> <font color="#330033">supplier:add(</font><font color="#00A033">"Acme Anvils,
> Inc."</font><font color="#330033">)</font>
> <font color="#330033"></font>
> 
> and use the exact same code to manage both instances.
>  
> Irv
> 


Good luck with your programming!

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

Search



Quick Links

User menu

Not signed in.

Misc Menu