Wacky Programming Tales

Tom Christiansen tchrist at mox.perl.com
Sun Aug 15 05:43:05 CEST 1999


     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    Brad Howes <bradh at mediaone.net> writes:
:  #define AND &&
:  #define OR  ||

[verba deleta]

:Has anyone else
:encountered such strange programming behavior?

Gosh yes.  I think it was the rogue source that had something like:

    #define until(expr) while(!expr)
    #define otherwise   break; default:

I don't remember whether it also had these, but I have
seen them elsewhere:

    #define forever()  for(;;)
    #define unless(expr) if(!expr)

We had this extremely elusive (like, he never came in) hot-shot compiler
guy back on Convex who *insisted* upon using these in the compiler builds.
His ranking/stature was such that he got away with it, despite most of
our tormented cries.

--tom
-- 
/* Force them to make up their mind on "@foo". */
    --Larry Wall, from toke.c in the v5.0 perl distribution




More information about the Python-list mailing list