Paul.Simmons@p0.f1.n382.z1.fidonet.org (Paul Simmons) (05/02/90)
In article <1812@gould.doc.ic.ac.uk> dcw@doc.ic.ac.uk (Duncan C White) writes: >The other irritating aspect of what Robert suggests is that you either >need to qualify each constant by it's module name, or need to name all >the constants in the import list, which is an awful lot of typing. When I hear complaints about long names and "qualidents" in Modula-2, my stock reply is this: What do you think modern editing tools are for? If you're writing a new piece of code and want to avoid keystrokes, use the IMPORT <modulename> statement, and pick a short, simple mnemonic for each of the strings you wish to avoid retyping. When you reach a convenient stopping point, use your editor's search and replace function to correct those nasty, unfriendly little strings to their meaningful, elegant forms. -- uucp: uunet!m2xenix!puddle!382!1.0!Paul.Simmons Internet: Paul.Simmons@p0.f1.n382.z1.fidonet.org
n8243274@unicorn.WWU.EDU (steven l. odegard) (05/02/90)
Okay, here is my $.02 worth about the pain of IMPORTing all those names
explicitely, though I thought that by now everyone would have syntax-directed
editors....
Do it this way:
IMPLEMENTATION MODULE Whatchamacallit ;
IMPORT InOut QUALIFIED ; (* employ a new concept, "qualified import" *)
...(*rest of module*)
END Whatchamacallit .
Why muck up the language by requiring the parser to recognize a new word
ALL? (Excuse me while I put on my flame-retardant suit...)
Those who don't like the keywork QUALIFIED used this way can pick another of
the 110 of the "reserved" words. May I suggest the following syntax for
importing in new MODULA-like languages:
LANGUAGENAME programname ;
IMPORT
FROM InOut WITH WriteString, WriteLn, WriteCard ;
FROM SYSTEM WITH WORD, BYTE, ADDRESS ;
FROM CommonInputOutputProcedures QUALIFIED ;
FROM TerminalIO ;
EXPORT QUALIFIED OpenWindow, CloseWindow, WriteWindow ;
LANGUAGENAME submodulename ;
...(*rest of module*)
END submodulename ;
END programname .
--
--SLO 8243274@wwu.edu uw-beaver!wwu.edu!8243274 n8243274@unicorn.wwu.edu