comp.lang.ada
 help / color / mirror / Atom feed
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: Pre-condition vs. Post-condition
Date: 26 Mar 91 23:36:40 GMT	[thread overview]
Message-ID: <2937@sparko.gwu.edu> (raw)
In-Reply-To: 5074@goanna.cs.rmit.oz.au

O'Keefe's posting gave such a good discussion of the issues that there's not
much to add, except the following:

The whole thread started with preconditions. I think Ada has a chance to
make life a whole lot easier by making it _possible_ to initialize all
types with default initial values, consistently. I am not interested in
having clients depend upon the initial values; rather I want clients
to be able to depend on variables, types, whatever, _not_ being
_uninitialized._ There will always be something in there that's
"in-range" for the type. Clearly Ada83 thought this was worth doing for
access types, and look how much easier it is to write linked-list
packages because there are no garbage pointers to worry about (leave
aside the dangling-pointer problem left unsolved by Unchecked_Deallocation!)

I was told once by an Ada83 high priest that the reason record fields can
be initialized is that, syntactically, it's "free" because the syntax
of a field declaration is the same as the syntax of a variable declaration.
I got the impression that the thinking didn't go much deeper than that.
They didn't bother with initializers for other types because it wasn't free.

Mike

  reply	other threads:[~1991-03-26 23:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-03-24 21:23 Pre-condition vs. Post-condition stt
1991-03-25 16:00 ` Arthur Evans
1991-03-25 17:05   ` Michael Feldman
1991-03-26  4:31     ` Jim Showalter
1991-03-26 10:21       ` Richard A. O'Keefe
1991-03-26 16:44         ` Michael Feldman
1991-03-26 22:03           ` Richard A. O'Keefe
1991-03-26 23:36             ` Michael Feldman [this message]
1991-03-28 20:43               ` Pre-condition vs. Post-condition (actually inintialization) Dana Carson
1991-03-27 21:34             ` Pre-condition vs. Post-condition Jim Showalter
1991-03-28  2:54               ` Michael Feldman
1991-03-29  3:28                 ` Jim Showalter
1991-03-27  3:12         ` Jim Showalter
1991-03-27 21:32         ` Initialization Paul Stachour
  -- strict thread matches above, loose matches on Subject: below --
1991-03-18 15:47 Pre-condition vs. Post-condition "Norman H. Cohen"
1991-03-15  3:57 Chris M. Little
1991-03-15 19:07 ` Michael Feldman
1991-03-17 12:26   ` George C. Harrison, Norfolk State University
1991-03-18 15:04   ` Joe Hollingsworth
1991-03-18 19:51     ` Marlene M. Eckert
1991-03-19 19:07       ` Michael Feldman
1991-03-21  3:01         ` Jim Showalter
1991-03-21 18:40           ` Michael Feldman
1991-03-19 20:38       ` Charles H. Sampson
1991-03-21  3:06         ` Jim Showalter
1991-03-19 21:07       ` Jim Showalter
1991-03-19  7:38     ` Jim Showalter
1991-03-19 14:46       ` Joe Hollingsworth
1991-03-21  2:46         ` Jim Showalter
1991-03-22 15:18       ` Brad Balfour
1991-03-19 18:17   ` Mike Gilbert
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox