Albert Lai writes: > For almost a decade, most (I dare claim even all) Pascal > and C compilers were "three-pass" or "two-pass". It means > perhaps the compiler reads the input two or three times > [...], or perhaps the compiler reads the input once, > produces an intermediate form and saves it to disk, then > reads the intermediate form from disk, produces a second > intermediate form and saves it to disk, then reads the > second intermediate form from disk, then it can produce > machine code. > > It must have been the obvious method, since even though > it was obviously crappy [...].
I beg to differ. Highly modular software is not necessarily crapy if you're writing something as complex as a C or Pascal compiler -- especially in times where RAM existed only in miniscule amounts. A highly modularized algorithm for counting lines, words, and characters in an input file, however, is something altogether different. I doubt anyone but the most inexperienced novices would have tried to do that in three passes in a strict language. Peter _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe