Stamp out program-level dwim! (was Re: effect of free())

Alan J Rosenthal flaps at dgp.toronto.edu
Wed Sep 20 01:09:04 AEST 1989


>In article <11070 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>> In particular, there is a school of thought that says machine architecture
>> should be designed to assist in program reliability.  That school
>> occasionally influences computer architectures such that actions like
>> merely continuing to shuffle around invalid pointers cause an error trap
>> to be taken.

CCDN at levels.sait.edu.au (DAVID NEWALL) writes:
>That is supposed to make programs reliable?

Yup.  When you're shuffling around invalid pointers, you've made a mistake.
That mistake should be made visible as soon as possible.  You refer in your
article to testing.  Testing is made much easier when invalid pointers cause
core dumps, than when they might cause bad output and they might not.

Dwim is good for user interfaces, but is ultimately unhelpful at the
programming level.  It makes things work sometimes and not work other times.
Programming tools should have reliable, easy to predict behaviour.

ajr



More information about the Comp.lang.c mailing list