From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Interface/Implementation (was Re: Design by Contract)
Date: 1997/09/10
Date: 1997-09-10T00:00:00+00:00 [thread overview]
Message-ID: <dewar.873897946@merv> (raw)
In-Reply-To: EG4KGI.ILG@ecf.toronto.edu
Patrick Doyle says
<<Also, remember that on average, saving the programmer from scanning
below saves only 1/2 the work. Not an order of magnitude, by any
means. Perhaps you'll argue that 1/2 is important enough? Well,>>
Not at all, since we can't keep a whole big object in our heads, if we
have to scan ahead to find information, we may easily have to do an
exponential amount of scanning. On the way forward in a linear pass,
we catalog and abstract and remember what needs to be remembered. When
we scan forward, we are looking for a particular piece of information,
and in general we don't know enough to catalog and abstract, even if
we could keep this kind of non-linear scanning straight.
Consider, in an Algol-68 program you see:
int q = a * b;
Contrast this to the Ada statement (Pascal, C, ... would be the same)
Q : constant Integer := A * B;
Now in the Ada case, you know you have seen A and B already, and hopefully
the (more descriptive) names that are present will trigger the reference to
your abstracted catalog gained by reading the text prior to this point and
you will remember what you are looking for. If not, a simple search in
reverse order from the point of reading will find the reference for you.
But in Algol-68, you have to do a rather careful scan forward, paying careful
attention to scope marks, to see if there are declarations of A and B in
the same scope and this is a forward reference. You have to do this even
if A and B are already declared, because normal block structure rules
say that you get the innermost one.
It is this kind of forward reference that the Ada design strenuously tries
to avoid, since it greatly complicates the reading of a program. Worse,
since people generally write linearly anyway, you get in the habit of
reading linearly. When you see in an Algol-68 program
int A;
...
begin
int B := A * 2;
...
You will almost always just assume that the A is a backward reference to
the declaration that preceded this. In the rare case where in fact there
is another A ahead of you, you will risk making a significant mistake in
understanding.
Linear comprehension is a very important capability. All text books have
indexes, which are of course functionally similar to hypretext links, but
we do not say "never mind about presenting things in a logical order,
building on what you have already presented, if you reference something
ahead, people can just look it up in the index". Instead we expend a lot
of effort to present things in a linear order (and indeed software for
computing partial orderings of topics to create appropriate linear orderings
is a standard part of the toolset for educators).
I notice these days that people often create Hypertext documents that
blatantly disregad this principle, and they are a huge pain to read. Sure
this kind of organization is OK for reference or help material, but it is
NOT the way to present a coherent body of knowledge that you expect people
to acquire in a comprehensive manner. A lot of people complain that they
get totally lost zooming around following links in a Hypertext document,
and vey often they are actually not complaining about the paradigm at all,
but rather its misuse to try to patch up poor document organization.
Robert Dewar
Ada Core Technologies
next prev parent reply other threads:[~1997-09-10 0:00 UTC|newest]
Thread overview: 185+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <01bcb389$24f579d0$1c10d30a@ntwneil>
1997-08-28 0:00 ` Interface/Implementation (was Re: Design by Contract) Tucker Taft
1997-08-29 0:00 ` Paul Johnson
1997-08-29 0:00 ` Jon S Anthony
[not found] ` <EFqDC8.342@ecf.toronto.edu>
1997-09-02 0:00 ` Samuel Mize
1997-09-03 0:00 ` Patrick Doyle
1997-09-03 0:00 ` Samuel Mize
1997-09-03 0:00 ` Paul Johnson
1997-09-04 0:00 ` Erik Ernst
[not found] ` <EFyrH2.7z2@syd.csa.com.au>
1997-09-04 0:00 ` W. Wesley Groleau x4923
1997-09-05 0:00 ` Patrick Doyle
1997-09-05 0:00 ` W. Wesley Groleau x4923
1997-09-06 0:00 ` Patrick Doyle
1997-09-05 0:00 ` Don Harrison
1997-09-05 0:00 ` W. Wesley Groleau x4923
1997-09-06 0:00 ` Joachim Durchholz
1997-09-09 0:00 ` Robert Dewar
1997-09-09 0:00 ` Richard Kenner
1997-09-10 0:00 ` Tucker Taft
1997-09-10 0:00 ` Joachim Durchholz
1997-09-10 0:00 ` One pass compilation? W. Wesley Groleau x4923
1997-09-10 0:00 ` Interface/Implementation (was Re: Design by Contract) Nick Leaton
1997-09-10 0:00 ` W. Wesley Groleau x4923
1997-09-11 0:00 ` Code ordering Steve Furlong
1997-09-12 0:00 ` Interface/Implementation (was Re: Design by Contract) Robert Dewar
1997-09-12 0:00 ` Nick Leaton
1997-09-11 0:00 ` Robert Dewar
1997-09-05 0:00 ` Jon S Anthony
1997-09-06 0:00 ` Fergus Henderson
1997-09-06 0:00 ` Jon S Anthony
1997-09-08 0:00 ` Robert Dewar
1997-09-11 0:00 ` Don Harrison
1997-09-08 0:00 ` Robert Dewar
1997-09-11 0:00 ` Don Harrison
1997-09-12 0:00 ` Robert Dewar
1997-09-05 0:00 ` Jon S Anthony
1997-09-06 0:00 ` Patrick Doyle
1997-09-06 0:00 ` Jon S Anthony
1997-09-04 0:00 ` Joerg Rodemann
1997-09-05 0:00 ` Don Harrison
[not found] ` <340fdb9f.0@news.uni-ulm.de>
1997-09-06 0:00 ` Joachim Durchholz
1997-09-06 0:00 ` Joachim Durchholz
1997-09-05 0:00 ` Matthew Heaney
1997-09-06 0:00 ` Matt Kennel (Remove 'NOSPAM' to reply)
1997-09-06 0:00 ` Jon S Anthony
1997-09-06 0:00 ` Patrick Doyle
1997-09-06 0:00 ` Matthew Heaney
1997-09-07 0:00 ` Patrick Doyle
1997-09-07 0:00 ` Matthew Heaney
1997-09-10 0:00 ` Don Harrison
1997-09-10 0:00 ` Matthew Heaney
1997-09-10 0:00 ` Samuel Mize
1997-09-10 0:00 ` Samuel Mize
1997-09-11 0:00 ` Robert Dewar
1997-09-12 0:00 ` Samuel Mize
1997-09-13 0:00 ` Tucker Taft
1997-09-12 0:00 ` Samuel T. Harris
1997-09-17 0:00 ` Don Harrison
1997-09-18 0:00 ` Robert Dewar
1997-09-11 0:00 ` Don Harrison
1997-09-10 0:00 ` Tucker Taft
1997-09-10 0:00 ` Matthew Heaney
1997-09-10 0:00 ` Patrick Doyle
1997-09-12 0:00 ` Robert Dewar
1997-09-13 0:00 ` Patrick Doyle
1997-09-11 0:00 ` Lee Webber
1997-09-15 0:00 ` W. Wesley Groleau x4923
1997-09-12 0:00 ` Don Harrison
1997-09-10 0:00 ` Don Harrison
1997-09-12 0:00 ` Robert Dewar
1997-09-16 0:00 ` Don Harrison
1997-09-17 0:00 ` Robert Dewar
1997-09-10 0:00 ` Patrick Doyle
1997-09-16 0:00 ` Don Harrison
1997-09-18 0:00 ` Robert Dewar
1997-09-18 0:00 ` Shmuel (Seymour J.) Metz
1997-09-20 0:00 ` Robert Dewar
1997-09-11 0:00 ` Robert Dewar
1997-09-10 0:00 ` Robert Dewar [this message]
1997-09-10 0:00 ` Nick Leaton
1997-09-16 0:00 ` Frederic Guerin
1997-09-06 0:00 ` Matthew Heaney
1997-09-06 0:00 ` Joachim Durchholz
1997-09-08 0:00 ` John G. Volan
1997-09-09 0:00 ` Paul Johnson
1997-09-09 0:00 ` Nick Leaton
1997-09-09 0:00 ` John G. Volan
1997-09-10 0:00 ` Nick Leaton
1997-09-10 0:00 ` Samuel Mize
[not found] ` <dewar.873826570@merv>
1997-09-09 0:00 ` Matthew Heaney
1997-09-11 0:00 ` Robert Dewar
1997-09-07 0:00 ` Robert Dewar
1997-09-08 0:00 ` Patrick Doyle
1997-09-09 0:00 ` Don Harrison
1997-09-09 0:00 ` W. Wesley Groleau x4923
1997-09-10 0:00 ` Robert Dewar
1997-09-11 0:00 ` Don Harrison
1997-09-12 0:00 ` Robert Dewar
1997-09-16 0:00 ` Don Harrison
1997-09-17 0:00 ` Robert Dewar
1997-09-05 0:00 ` Robert Dewar
1997-09-01 0:00 ` Matt Kennel (Remove 'NOSPAM' to reply)
1997-09-02 0:00 ` Nick Leaton
1997-09-03 0:00 ` Matt Kennel (Remove 'NOSPAM' to reply)
1997-09-15 0:00 Marc Wachowitz
1997-09-16 0:00 ` Owen Fellows
-- strict thread matches above, loose matches on Subject: below --
1997-09-12 0:00 Marc Wachowitz
1997-09-12 0:00 ` Joachim Durchholz
1997-09-12 0:00 ` Samuel T. Harris
1997-09-12 0:00 ` Jon S Anthony
1997-09-15 0:00 ` Samuel T. Harris
1997-09-16 0:00 ` Jon S Anthony
1997-09-09 0:00 Marc Wachowitz
1997-09-15 0:00 ` Owen Fellows
1997-10-13 0:00 ` Bill Foote
1997-09-06 0:00 Ell
1997-09-06 0:00 ` Samuel Mize
[not found] <EForKz.FJ7@ecf.toronto.edu>
1997-09-01 0:00 ` Don Harrison
1997-09-02 0:00 ` Don Harrison
1997-08-07 0:00 Safety-critical development in Ada and Eiffel Ken Garlington
1997-08-12 0:00 ` Don Harrison
1997-08-25 0:00 ` Design by Contract Bertrand Meyer
[not found] ` <3402d123.0@news.uni-ulm.de>
1997-08-26 0:00 ` Nick Leaton
[not found] ` <3402e51d.0@news.uni-ulm.de>
[not found] ` <3402E8C9.3384D976@calfp.co.uk>
[not found] ` <dewar.872631036@merv>
[not found] ` <3403F668.F6B57D97@calfp.co.uk>
[not found] ` <34041331.0@news.uni-ulm.de>
[not found] ` <3404696D.4487EB71@eiffel.com>
1997-08-27 0:00 ` Interface/Implementation (was Re: Design by Contract) Bertrand Meyer
[not found] ` <34048FDC.13728473@eiffel.com>
1997-08-27 0:00 ` Bertrand Meyer
1997-08-28 0:00 ` Patrick Doyle
1997-08-28 0:00 ` W. Wesley Groleau x4923
1997-08-28 0:00 ` Jon S Anthony
1997-08-29 0:00 ` Robert Dewar
[not found] ` <EForsv.Fqo@ecf.toronto.edu>
[not found] ` <JSA.97Aug29191413@alexandria.organon.com>
[not found] ` <EFqDAG.2zn@ecf.toronto.edu>
1997-08-30 0:00 ` Jon S Anthony
1997-09-02 0:00 ` Don Harrison
1997-09-02 0:00 ` Jon S Anthony
1997-09-03 0:00 ` Don Harrison
[not found] ` <EFwuzD.BxE@ecf.toronto.edu>
1997-09-04 0:00 ` John G. Volan
1997-09-04 0:00 ` W. Wesley Groleau x4923
1997-09-05 0:00 ` Patrick Doyle
1997-09-05 0:00 ` W. Wesley Groleau x4923
1997-09-06 0:00 ` Patrick Doyle
1997-09-08 0:00 ` Paul Johnson
1997-09-06 0:00 ` Jon S Anthony
1997-09-08 0:00 ` Robert Dewar
1997-09-09 0:00 ` Patrick Doyle
1997-09-09 0:00 ` Matthew Heaney
1997-09-10 0:00 ` Patrick Doyle
1997-09-09 0:00 ` Robert S. White
1997-09-09 0:00 ` Paul Johnson
1997-09-11 0:00 ` Robert Dewar
1997-09-11 0:00 ` Veli-Pekka Nousiainen
1997-09-12 0:00 ` Paul Johnson
1997-09-14 0:00 ` Ken Garlington
1997-09-09 0:00 ` Matt Kennel (Remove 'NOSPAM' to reply)
1997-09-10 0:00 ` John Viega
1997-09-10 0:00 ` Matt Kennel (Remove 'NOSPAM' to reply)
1997-09-05 0:00 ` Patrick Doyle
1997-09-05 0:00 ` Franck Arnaud
1997-09-04 0:00 ` Don Harrison
1997-09-05 0:00 ` Patrick Doyle
1997-09-09 0:00 ` Don Harrison
1997-09-09 0:00 ` W. Wesley Groleau x4923
1997-09-10 0:00 ` Veli-Pekka Nousiainen
1997-09-10 0:00 ` Samuel Mize
1997-09-12 0:00 ` Don Harrison
1997-09-10 0:00 ` Patrick Doyle
1997-09-10 0:00 ` Joerg Rodemann
1997-09-10 0:00 ` Joachim Durchholz
1997-09-12 0:00 ` Joerg Rodemann
1997-09-10 0:00 ` Patrick Doyle
1997-09-11 0:00 ` Matt Austern
1997-09-12 0:00 ` Jon S Anthony
1997-09-13 0:00 ` Patrick Doyle
1997-09-11 0:00 ` Robert S. White
1997-09-11 0:00 ` Don Harrison
1997-09-12 0:00 ` Robert Dewar
1997-09-13 0:00 ` Patrick Doyle
1997-09-12 0:00 ` Jon S Anthony
1997-09-13 0:00 ` Patrick Doyle
1997-09-16 0:00 ` Brian Rogoff
1997-08-28 0:00 ` Tucker Taft
1997-08-28 0:00 ` W. Wesley Groleau x4923
1997-08-28 0:00 ` Jon S Anthony
1997-08-29 0:00 ` Suzanne Zampella
1997-08-29 0:00 ` Jon S Anthony
[not found] ` <EFnK8D.Lsv@ecf.toronto.edu>
1997-08-29 0:00 ` Jon S Anthony
1997-08-30 0:00 ` Patrick Doyle
1997-08-30 0:00 ` Jon S Anthony
1997-09-01 0:00 ` Patrick Doyle
[not found] ` <340E9BA2.32B3@rbgg252.rbg1.siemens.de>
1997-09-07 0:00 ` Robert Dewar
[not found] ` <3406A707.787D@dmu.ac.uk>
1997-08-29 0:00 ` Joerg Rodemann
1997-08-29 0:00 ` Ralph Paul
1997-09-01 0:00 ` Don Harrison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox