RE: Namespace solution?

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

G'day all

Irv Mullins wrote:
> 1. Deprecate the 'global' keyword, and introduce the new keywords:
>     export and import..
>     example:
>       export x,y -- in file a
>       export x,y -- in file.b
>
>      -- your program
>       import x from file.a
>       import y from file.b
> <snip>

Yep, that looks useful. However, what would I do if I wanted both values 
of x, rather than one x and one y? There would have to be something like 
the following available (a sort of "alias by stealth"):

  import x from file.a
  import y from file.b:x  -- assign x from file.b to my local y

The above doesn't exactly stand out - it looks too easy to overlook the 
":x" extension on the second import. To make it more visible, maybe 
something like:

  import file.a:x
  import file.b:x as y

Thoughts, anyone?

Regards
Tony

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

Search



Quick Links

User menu

Not signed in.

Misc Menu