From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,279217ad1d03b7ad X-Google-Attributes: gidf8c9b,public X-Google-Thread: 1020c6,279217ad1d03b7ad X-Google-Attributes: gid1020c6,public X-Google-Thread: fee84,279217ad1d03b7ad X-Google-Attributes: gidfee84,public From: Dan.Pop@mail.cern.ch (Dan Pop) Subject: Re: What do you think of osf/1? Date: 1995/06/27 Message-ID: #1/1 X-Deja-AN: 105130572 sender: news@news.cern.ch (USENET News System) x-nntp-posting-host: ues5.cern.ch references: <3rst5b$i3c@news1.WING.NET> <3s7vdi$4af@news.duke.edu> <3s9j2b$i66@news.duke.edu> <3sbh8o$1ug@kani.Helsinki.FI> organization: CERN European Lab for Particle Physics newsgroups: comp.unix.osf.osf1,comp.unix.admin,comp.unix.questions In dsr@lns598.lns.cornell.edu (Daniel S. Riley) writes: >In article Dan.Pop@mail.cern.ch (Dan Pop) writes: >Dan.Pop> If the developer cannot be sure that he managed to do this >Dan.Pop> before shipping, he will replace assert() with proper error >Dan.Pop> detection and reporting code. Joe User should _never_ see >Dan.Pop> something looking like "assertion failed...". > >So DEC should redefine assert to print out a polite error message? I >fail to see how that does any good--it is still an incomprehensible >error message. Whether it says "assertion failed" followed by some >gibberish or "A fatal error has occurred, please submit an SPR to DEC >with this information" followed by some gibberish makes little >difference to me. Replacing every "assert()" with a more informative >message would be a waste of engineering time, and a undesirable >impediment to free use of assert(). Even if it makes little difference to you, it makes a lot of difference to the confused user who doesn't understand what's wrong with his Fortran code that it doesn't link properly. A C programmer, at least knows what an assert is and understands immediately that the fault isn't in his files. The C illiterate programmer isn't (and shouldn't be) required to know what a C assert is in order to compile and link his programs. Internal consistency checks are a good thing, using assert() to report their failure isn't. Those who invented NDEBUG knew what they were doing. If a program detects itself that it's broken, it can let the user know the bad news in a friendly, non confusing, manner and assert() isn't the right tool for this. Dan -- Dan Pop CERN, CN Division Email: Dan.Pop@mail.cern.ch Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland