comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Two dimensional arrays: help
Date: 1998/01/05
Date: 1998-01-05T00:00:00+00:00	[thread overview]
Message-ID: <dewar.884014602@merv> (raw)
In-Reply-To: 68qqlp$25v@top.mitre.org


Mike said

<<In any computer language or other artistic endeavor, one of the easiest
ways to learn the rules is by examples. In many cases the rules are
so culturally specific that outsiders actually benefit more from
working examples than from the rules at all. In addition, when the rules
change (noteable examples are the loss of efficiency introduced into
unsigned numbers between the rationale and the manual, and the
inconsistency accepted as normal in the ways that stream_io works
on different current versions of gnat), it is impossible to know
the rules except by having access to working examples.
>>

While I agree that programming has aspects of artistry certainly, I strongly
disagree that the analogy means that you should learn programming
*languages* by example.

The trouble is you don't learn rules precisely from examples, you learn
a subset of things that work without really understanding the rules. A
good programmer should aspire to 100% understanding of the subset of the
language they are using, and have an understanding at an appropritae
level of abstraction. I admit immediately that most programmers fail this
requirement!

As for your two off-hand examples, I have no idea what you are talking
about. I know of no "loss of efficiency introduced into unsigned
numbers between the rationale and the manual", you should elaborate.
Certainly the rules in the manual are quite clear, and I see no basis
at all for the claim that it is impossible to know the rules about
unsigned numbers without examples. Remember that the examples in the RM
have absolutely NO normative information at all. If the rules on unsigned
numbers (of course you really mean modular types) are incomplete in the
manual, then examples cannot make up for the incompleteness, indeed any
example that conveyed information not derivable from the RM is plain wrong.
Please justify this suprising allegation with specifics.

Ditto for "inconsistencies" in the way stream_io works in different versions
of GNAT. Again, as far as I know, the stream_io in all versions of GNAT is
consistent with the rules in the RM. If you see inconsistencies, then one of
two things is possible:

(a) you have found a bug, please report it

(b) you have some model of how stream_io might work that is not derivable
from the rules, the stream_io as implemented consistent with these rules
differs from your model. I guess that this is probably the case here, and
it just goes to emphasize what a bad idea it is to try to learn how things
work by guessing from examples rather than reading the rules.

Again, it would be instructive to know exactly what you are referring to,
I suspect it would make a very nice case study showing why learning from
examples is an unreliable way to learn.

Please elucidate both examples.





  reply	other threads:[~1998-01-05  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-05  0:00 About a C/C++ to ADA translator Marcos Jimenez Bermejo
1998-01-05  0:00 ` Robert Dewar
1998-01-05  0:00   ` Marcos Jimenez Bermejo
1998-01-05  0:00     ` Kenneth W. Sodemann
1998-01-05  0:00     ` nabbasi
1998-01-05  0:00   ` Two dimensional arrays: help Michael F Brenner
1998-01-05  0:00     ` Robert Dewar [this message]
1998-01-06  0:00       ` Chris Morgan
1998-01-06  0:00         ` Robert Dewar
1998-01-05  0:00 ` About a C/C++ to ADA translator David  Weller
1998-01-05  0:00   ` Robert Dewar
1998-01-07  0:00 ` Benoit Jauvin-Girard
1998-01-12  0:00   ` Jean-Claude MAHIEUX
1998-01-09  0:00 ` Brian G. Holmes
replies disabled

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