Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!texbell!merch!sneaky!gordon From: gordon@sneaky.UUCP (Gordon Burditt) Newsgroups: comp.unix.wizards Subject: Re: The *ART* of Computer Programming Message-ID: <29078@sneaky.UUCP> Date: 9 Mar 90 05:17:47 GMT References: <1990Feb26.234217.23251@aucs.uucp> <732@sppy00.UUCP> <12533@nigel.udel.EDU> <14096@cbnewsc.ATT.COM> Organization: Gordon Burditt Lines: 27 >> >If a program is worth >writing it is worth writing well. >> Have you never heard of a one-time program? Or were you not referring to >> this kind of program? -- Darren > >There is nothing so long-lived as a useful one-shot program!!! Ok, here's my definition of a one-time program: A one-shot program is a short program that isn't supposed to be executed, and either doesn't compile or compiles with bad code generation using some compiler of interest. Its only function is to demonstrate a compiler bug. Example (made up but something very close really happened): main() { # ifndef NOBUG register # endif unsigned int i = 4; foo( i <<= i ); /* compiler error: no table entry for op REG */ } /* nobody ever bothers to write foo() */ Gordon L. Burditt sneaky.lonestar.org!gordon