From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e61c8636ef35379d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-17 08:20:24 PST Path: supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!news.verio.net!sjc-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: Examples in Docs, was Re: Escape Sequences in Strings In-Reply-To: <942vqr$sd0$1@nnrp1.deja.com> Message-ID: References: <93objj$guk$1@nnrp1.deja.com> <93q77h$rr6$1@nnrp1.deja.com> <940f9j$nj2$1@nnrp1.deja.com> <940n0u$tnf$1@nnrp1.deja.com> <942brr$b0t$1@nnrp1.deja.com> <942vqr$sd0$1@nnrp1.deja.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Wed, 17 Jan 2001 16:20:45 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sjc-read.news.verio.net 979748445 206.184.139.136 (Wed, 17 Jan 2001 16:20:45 GMT) NNTP-Posting-Date: Wed, 17 Jan 2001 16:20:45 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:4100 Date: 2001-01-17T16:20:45+00:00 List-Id: On Wed, 17 Jan 2001, Robert Dewar wrote: > In article <942brr$b0t$1@nnrp1.deja.com>, > mark_lundquist@my-deja.com wrote: > > > Not a connection, an analogy. With respect to the function > > of a program, comments are superfluous; with respect to the > > language definition, examples are superfluous. > > I disagree strongly with this analogy. > > In the case of a language definition, examples indeed convey > no information that cannot be derived from the definition > proper (unless the definition is incomplete). Yes, they may > be helpful in understanding, but they do not have any > non-derivable information. [...snip...] > Indeed if you write comments that CAN be derived from the code, > as in: > > a := a + 1; -- increment a > > then you have written a junk, completely useless comment. > Indeed I would say that comments like this are what are > analogous to examples in programming language definitions :-) I wonder if you learned SML programming from "The Definition of Standard ML" :-). Seriously, I'm pretty amazed that anyone can learn to program from a typical language spec without examples. Do you think it is a learnable and teachable skill (do you teach your students this?), or is it a unique quirk? -- Brian