Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Pre- and post- conditions (was Re: Coding style for small if statements) Date: Thu, 02 Apr 2020 07:57:44 -0700 Organization: A noiseless patient Spider Lines: 26 Message-ID: <861rp66il3.fsf@linuxsc.com> References: <20200131234613.59047e037939ceb549b8e6d6@gmail.com> <65de5d07-838a-4a5f-bd70-b8a263fc61d6@googlegroups.com> <87imkkobdm.fsf@bsb.me.uk> <726b2209-ca7e-40fe-b429-fbc062f5b6bd@googlegroups.com> <874kw3nq6s.fsf@bsb.me.uk> <87k14ym0lg.fsf@bsb.me.uk> <875zggms21.fsf@bsb.me.uk> <87zhdrlqns.fsf@bsb.me.uk> <86zhdbcaoo.fsf@linuxsc.com> <3e4ee590-e882-4442-9b5c-e8a07ff16dd8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="b8d048feb5cbf1a44d80a9279d4cb30f"; logging-data="10388"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aKXdCaDl7faysmBy7CMbbtOVApmzOfwY=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:mKKoP23Ttb2m+1VvlPVLEf2stJo= sha1:YrAcrKgLkx230S/TgxNBSIWS4YI= Xref: csiph.com comp.lang.c:150954 James Kuyper writes: > On Saturday, February 22, 2020 at 3:01:53 AM UTC-5, Tim Rentsch wrote: > >> James Kuyper writes: >> >>> On 2/11/20 2:19 AM, Jorgen Grahn wrote: >>> ... >>> >>>> The thing I have against unit tests is that, for me, writing tests >>>> means I don't read the code as carefully. ... >>> >>> That makes just as much sense, for exactly the same reason, as "I don't >>> like washing my hands because it means that I don't feel a need to avoid >>> people who are coughing and sneezing, and then I end up catching their >>> colds." >> >> Whether the original statement is true or not, the analogy >> is flawed. > > Of course you feel that way - I don't think you've ever seen an analogy > that you liked. That's not a particularly useful response. [...] It's not my job to educate you. As a rule I'm not inclined to try to be helpful to people who seem to go out of their way to make it difficult to provide help.