comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: About to give up...
Date: 1998/08/07
Date: 1998-08-07T00:00:00+00:00	[thread overview]
Message-ID: <dewar.902545843@merv> (raw)
In-Reply-To: 6qeb1u$728$1@nnrp1.dejanews.com

Dan said

<<> As for the useless values, just put them into "Trash" variables. No big deal.

True but tedious...
>>


Tedious for who? the reader, or the writer. 

Remember that we don't care two hoots about the writer in the Ada design if
the writer's interest conflict with those of the reader.

(or maintainer!)

In fact the ease of accidentally ignoring returned values is one of the
great weaknesses in C. C almost invites programs to avoid taking the 
effort to deal with error indications.

If you *do* want to completely ignore returned result, I find a useful
notation to be

	Discard (func (params));

where Discard is an inlined null procedure that ignores its parameter.

But very often you will do better to do something like

        Check_Error (func (params));

where Check_Error checks that the returned result is OK, and raises an
exception if not.





  reply	other threads:[~1998-08-07  0:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-06  0:00 About to give up i96danma
1998-08-06  0:00 ` dennison
1998-08-07  0:00   ` i96danma
1998-08-07  0:00     ` Robert Dewar [this message]
1998-08-08  0:00       ` Dan Mattsson
1998-09-05  0:00         ` Tom Moran
1998-08-08  0:00       ` Matthew Heaney
1998-08-08  0:00         ` Robert Dewar
1998-08-08  0:00           ` Matthew Heaney
1998-08-06  0:00 ` Robert Dewar
1998-08-08  0:00   ` Dan Mattsson
1998-08-10  0:00     ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1998-08-16  0:00 Robert Dewar
1998-08-06  0:00 i96danma
1998-08-06  0:00 ` Oliver.Kellogg
1998-08-07  0:00   ` Tarjei Tj�stheim Jensen
1998-08-06  0:00 ` Dale Stanbrough
1998-08-06  0:00   ` Peter Amey
1998-08-06  0:00     ` Tom Moran
replies disabled

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