f*cking re module
Rocco Moretti
roccomoretti at hotpop.com
Fri Jul 8 10:29:35 EDT 2005
François Pinard wrote:
> I once worked with a PL/I compiler (on a big IBM mainframe), which was
> trying to be helpful by spitting pages of:
>
> Error SUCH AND SUCH, assuming that THIS AND THIS was meant.
>
> and continuing compilation nevertheless. It was a common joke to say
> that PL/I would compile some random valid program out of any garbage!
We may laugh now (and then), but it was likely a valid design decision
at the time. If you're running a job on "big iron", depending on the
situation, you might have had only a block of a few hours on a
timeshared system, perhaps unattended. If the compiler refused to
continue, the rest of your block might have been wasted. (At the very
least, you would have had to sign up for an additional block later.)
If your program had only minor errors, there was likely a good chance
that the compiler might guess correctly, and your program would compile
to what you wanted in the first place. If not, by continuing on, the
compiler can flag additional errors later in your code, allowing you to
fix those bugs sooner. (Instead of choking on the first one and refusing
to continue.)
Error-checking-by-compiling only "works" if you have cheap computing
power you can run attended. (Can you imagine what TDD would be like if
you had to wait 24+ hrs between code executions?)
More information about the Python-list
mailing list