[net.lang.mod2] one pass compilers; forward references

alexc@dartvax.UUCP (Alex Colvin) (08/31/84)

I sympathize with the Volition folks who require forward de-
clarations.   Note that ADA[1] requires forward declarations
for any identifier that is referenced before its  time.   It
makes life considerably simpler for the compiler without im-
posing much of a burden on the user.  It is  important  that
Modula  be  convenient to implement as well as to use.  This
was the reason for PASCAL's success, more than  any  virtues
of the language design.

I might even argue that forward declarations can  make  life
easier  for  the programmer.  Don't forget that any work the
compiler has to do must be duplicated by someone  trying  to
read  the program.  This includes, e.g., symbol table lookup
and overloading resolution.

[1] ADA is a well-known trademark of the Department of  War,
as well as a fascinating book by Nabokov.