Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!csri.toronto.edu!wayne From: wayne@csri.toronto.edu (Wayne Hayes) Newsgroups: comp.os.minix Subject: Re: Future of Minix Message-ID: <1989Jul15.151326.1517@jarvis.csri.toronto.edu> Date: 15 Jul 89 19:13:26 GMT References: <19654@louie.udel.EDU> <2885@ast.cs.vu.nl> Organization: University of Toronto, CSRI Lines: 21 In article <2885@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes: >In article <19654@louie.udel.EDU> V61%DHDURZ1.BITNET@cunyvm.cuny.edu (Ronald Lamprecht) writes: >>The additional code should >>be included in #ifdef DEBUG -- #endif so that it is possible to generate >>a fast run-time library and a debugging library version. > >Argh! I think #ifdefs make code very hard to read and ugly. I am not all >that wild about the idea. > >Andy Tanenbaum (ast@cs.vu.nl) Oh, c'mon. There are very clean ways to do this. One way I do it (if you want nice looking code) is to write it with the #ifdef stuff, test the program, save away a copy and then delete the #ifdef stuff, and then do a diff between the two, then delete the one with the #ifdefs. That way the final product doesn't have all the #ifdef stuff but it's there in the diff file if you need it. -- ------------------------------------------------------------------------------ "Open the pod bay doors, HAL." "I'm sorry Dave, I'm afraid I can't do that." Wayne Hayes INTERNET: wayne@csri.toronto.edu CompuServe: 72401,3525