Xref: utzoo comp.lang.eiffel:1438 comp.lang.objective-c:189 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!prism!hydra.gatech.edu!tynor From: tynor@hydra.gatech.edu (Steve Tynor) Newsgroups: comp.lang.eiffel,comp.lang.objective-c Subject: Re: Whose debugger is better, Eiffel or Objective C? Message-ID: Date: 4 Mar 91 15:08:27 GMT References: <1991Feb26.045704.11186@ecst.csuchico.edu> <1991Feb26.155726.9531@noose.ecn.purdue.edu> <6501@stpstn.UUCP> Sender: tynor@prism.gatech.EDU Followup-To: comp.lang.eiffel Organization: Georgia Tech Research Institute Lines: 37 In-reply-to: cox@stpstn.UUCP's message of 3 Mar 91 13:37:38 GMT In article <6501@stpstn.UUCP> cox@stpstn.UUCP (Brad Cox) writes: | In article <1991Feb26.155726.9531@noose.ecn.purdue.edu> giacomet@haley.ecn.purdue.edu (Frederic Giacometti) writes: | >all my debuging is done with assertion monitoring. Sometimes, I've | >used the trace capability but that's it. I'd believe the assertion | >by Eiffel's authors that traditional debuggers are somehow obsolete | >in Eiffel to be relevant, if not true. I must also say that, unlike | >my experience with Objective-C or C, the debugging stage with Eiffel | >has been much limited. | | Why not use C or Objective-C's assertion monitoring? Simply | #include "assert.h" and have at it. | { | assert(precondition); | ...body... | assert(postcondition); | } | Class invarients are, IMO, best expressed in a separate file, distinct | from the class under test. I call these separate files "gauges" by | analogy with inspection gauges of tangible domains like manufacturing. I disagree - class invariants are an integral specification of the class's behavior - they ought to be in the same place as the class specification (the class source file in Eiffel, the class header file in C++, I'll have to plead ignorance about ObjC). As much as I like in C and it's derivatives, it's not as good as the Eiffel assertion mechanism. The pre- and post-conditions of a routine and the class invariant are visible for all to see - not buried in the implementation. Of course, it's possible to have inline assertions (equivalent to the assert() macro) in Eiffel too (the `check' instruction). =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Eiffel: Accept no substitutes Steve Tynor Georgia Tech Research Institute tynor@prism.gatech.edu