comp.lang.ada
 help / color / mirror / Atom feed
From: Richard Riehle <richard@adaworks.com>
Subject: Re: Assertions in the Next Ada Standard
Date: Wed, 16 Jan 2002 22:23:13 -0800
Date: 2002-01-17T06:28:04+00:00	[thread overview]
Message-ID: <3C466DD1.5080813D@adaworks.com> (raw)
In-Reply-To: 3C3FE630.BDB27416@adaworks.com

I appreciate the thoughtful contributions regarding
assertions in next Ada standard.   It was my understanding
someone was drafting a proposal for this and I was
hoping to see some comment from whoever that might
be.

Meanwhile, I clipped the following from a discussion about
the assertion mechanism in Java from a discussion on comp.object.


------------------ quote from comp.object -------------------------
The documentation at Sun recommends NOT using assertions
to check argument values on public methods.  You should
still continue to do this kind of thing with if statement
and throw IllegalArgumentException.

--------------------<quote from Sun>---------------------
    3.Why not provide a full-fledged design-by-contract
      facility with preconditions, postconditions and class
      invariants, like the one in the Eiffel programming
      language?

     We considered providing such a facility, but were unable
     to convince ourselves that it is possible to graft it
     onto the Java programming language without massive changes
     to the Java platform libraries, and massive inconsistencies
     between old and new libraries. Further, we were not
     convinced that such a facility would preserve the
     simplicity that is Java's hallmark. On balance, we came to
     the conclusion that a simple boolean assertion facility was
     a fairly straight-forward solution and far less risky. It's
     worth noting that adding a boolean assertion facility to
     the language doesn't preclude adding a full-fledged design-
     by-contract facility at some time in the future.
-----------------<end of quote from Sun>-------------------
----------------- end of quote from comp.object ---------------



> Richard Riehle







      parent reply	other threads:[~2002-01-17  6:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-11  6:20 Assertions in the Next Ada Standard Richard Riehle
2002-01-11  9:23 ` Dale Stanbrough
2002-01-11 13:47   ` Robert A Duff
2002-01-11 23:28   ` Nick Roberts
2002-01-12  1:30     ` Darren New
2002-01-11 20:07 ` FGD
2002-01-11 20:39   ` Wes Groleau
2002-01-12  4:56     ` Robert Dewar
2002-01-12  7:30   ` Richard Riehle
2002-01-12 19:58     ` FGD
2002-01-12 21:27       ` Ed Falis
2002-01-12 22:45     ` Darren New
2002-01-14 17:20       ` Robert A Duff
2002-01-14 17:42         ` Darren New
2002-01-14 23:16     ` Mark Lundquist
2002-01-17  6:23     ` Richard Riehle [this message]
replies disabled

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