From: Patrick Richard Wibbeler <pwibbele@trumpet.aix.calpoly.edu>
Subject: Re: To Initialise or not
Date: 1996/05/01
Date: 1996-05-01T00:00:00+00:00 [thread overview]
Message-ID: <Pine.A32.3.91.960501022514.77921E-100000@trumpet.aix.calpoly.edu> (raw)
In-Reply-To: DqnGoz.10v@world.std.com
One other point about the following exchange...
> >> > As an aside, I always write ":= null;" when I want to *rely* on the
> >> > initial value of a pointer, even though I know that pointers are always
> >> > default-initialized to null.
> >>
> >> You're not the only one. :)
>
> >I think I'm the only person in the world that _doesn't_ like this
> >coding style. I don't like it because I can't find a use for it.
> >Generally, I only want to enter information if there's some use for it,
> >either to make the program work, or to make it more readable, etc.
What if either of the following occur...
1] For some reason the language is changed so that pointers are no longer
initialized to null as when C started using a negative
number rather than zero as the end of file. Those who had
while(flag != EOF) rather than while(flag != 0) still had code that worked!
2] Someone attempts to re-write the code in another language that
doesn't initialize pointers to null. He/she may not know whether or not
to initialize the pointer to null without looking closely at the code..
Readability is not just for now. It is for later.
The main point is who knows who or why the code will be used in the
future. At such a small cost, the readability/maintainability in the
future could be large.
Patrick
next prev parent reply other threads:[~1996-05-01 0:00 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-29 0:00 To Initialise or not Steve O'Neill
1996-04-29 0:00 ` Ken Garlington
1996-04-29 0:00 ` Robert Dewar
1996-04-30 0:00 ` Ken Garlington
1996-04-30 0:00 ` Robert A Duff
1996-04-30 0:00 ` Ken Garlington
1996-04-30 0:00 ` Robert A Duff
1996-05-01 0:00 ` Keith Thompson
1996-05-01 0:00 ` Theodore E. Dennison
1996-05-01 0:00 ` Robert A Duff
1996-05-02 0:00 ` Michael F Brenner
1996-05-02 0:00 ` Robert A Duff
1996-05-04 0:00 ` Kevin D. Heatwole
1996-05-02 0:00 ` Theodore E. Dennison
1996-05-02 0:00 ` Chris Warack <sys mgr>
1996-05-02 0:00 ` Robert A Duff
1996-05-06 0:00 ` Ken Garlington
1996-05-02 0:00 ` Robert A Duff
1996-05-06 0:00 ` Ken Garlington
1996-05-07 0:00 ` Robert A Duff
1996-05-08 0:00 ` Ken Garlington
1996-05-08 0:00 ` Robert A Duff
1996-05-09 0:00 ` Ken Garlington
1996-05-09 0:00 ` Robert A Duff
1996-05-01 0:00 ` Dale Stanbrough
1996-05-02 0:00 ` Robert Dewar
1996-05-02 0:00 ` Theodore E. Dennison
1996-05-02 0:00 ` Robert A Duff
1996-05-01 0:00 ` Robert A Duff
1996-05-02 0:00 ` Keith Thompson
1996-05-03 0:00 ` Robert A Duff
1996-05-06 0:00 ` Ken Garlington
1996-05-06 0:00 ` Ken Garlington
1996-05-07 0:00 ` Robert A Duff
1996-05-08 0:00 ` Ken Garlington
1996-05-09 0:00 ` Robert A Duff
1996-05-10 0:00 ` Robert A Duff
1996-05-10 0:00 ` Ken Garlington
1996-05-10 0:00 ` Robert A Duff
1996-05-10 0:00 ` Ken Garlington
1996-05-11 0:00 ` Robert A Duff
1996-05-11 0:00 ` David Kristola
1996-05-11 0:00 ` Robert A Duff
1996-05-13 0:00 ` Ken Garlington
1996-05-13 0:00 ` Robert A Duff
1996-05-13 0:00 ` Ken Garlington
1996-05-13 0:00 ` Ken Garlington
1996-05-13 0:00 ` Robert A Duff
1996-05-13 0:00 ` Ken Garlington
1996-04-30 0:00 ` Robert A Duff
1996-05-01 0:00 ` Patrick Richard Wibbeler [this message]
1996-05-06 0:00 ` Ken Garlington
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox