(j3.2006) Module name class

Van Snyder Van.Snyder
Thu Jan 14 22:29:10 EST 2010

Is there any hope that in the next revision we could treat module names
in such a way as to allow local names to be the same?

I was just working on an 1846-line module and had to use some stuff from
another module, that had not previously been accessed.

That module has the same name as a variable in the using scope.

I now have to do one of four things:
1.  Change the module name.  It's used in 38 other modules.
2.  Change the declaration and all 23 references to the variable name in
the using scope.
3.  Create another module that has no other purpose than to have a
different name from the used one, which will contain nothing more than a
USE statement for the one I really want to use.
4.  Use the module in a module where it's not otherwise necessary, so I
can use things from the desired one in the place I really want to access

The first two are tedious and expensive.  The last two are ugly kludges.

Module names have only four uses:
1.  on the module statement
2.  on the end module statement
3.  on the use statement
4.  on the submodule statement.

None of these conflict in any way with local names.

See 04-206.

Van Snyder                    |  What fraction of Americans believe 
Van.Snyder at jpl.nasa.gov       |  Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.

More information about the J3 mailing list