SPUG: OT: Re: PERL technical interview
Jeff Almeida
spud at spudzeppelin.com
Mon Jan 23 10:35:36 PST 2006
wow! forcing you to accept command-line arguments and potentially
redefining a successful exit as something other than 1?
mind if i ask which platform?
but you're right of course -- what is "canonically bug-free" for a
null program depends on your definition of the canon.
jeff
On Jan 23, 2006, at 11:59 AM, Yitzchak Scott-Thoennes wrote:
> On Mon, Jan 23, 2006 at 10:32:58AM -0600, Jeff Almeida wrote:
>> <minimalist-hat>
>>
>> correctness.
>>
>> at it's root (ok bad pun), all code is a collection of patches to /
>> bin/true.... that is:
>>
>> int main() {
>> return 1;
>> }
>>
>> which is in a sense, the algebraic kernel of the software vector-
>> space. it's also conveniently correct and canonically bug-free.
>
> I've worked on a platform where the above is buggy. Canonically
> bug-free
> would be more like:
>
> #include <stdlib.h>
> #ifndef EXIT_SUCCESS
> #define EXIT_SUCCESS 1
> #endif
>
> int main(int argc, char *argv[], char *envp[]) {
> return EXIT_SUCCESS;
> }
****************************************
Jeff D. Almeida * Corinth, TX
spud at spudzeppelin.com
****************************************
More information about the spug-list
mailing list