From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 6 Sep 91 21:09:34 GMT From: att!cbnewsl!willett@ucbvax.Berkeley.EDU (david.c.willett) Subject: Re: Ada micro Style for Programs in Introductory Textbooks Message-ID: <1991Sep6.210934.736@cbnewsl.cb.att.com> List-Id: In article <1991Sep5.190551.8272@beaver.cs.washington.edu>, pattis@june.cs.wash ington.edu (Richard Pattis) writes: > I would like to appeal to the net for some advice. Should I toss out my own > style and typeset my code exactly like the LRM? [ Description of Prattis' goals and alternative style deleted ] > > 4) I have seen styles (out of PARC?) where the case of the first letter is > used to separate local from non-local accesses. I was planning on mentioning > this (as well as hungarian notation, which is not so necessary in Ada compare d > to C) but not advocating it. Are there other important conventions that I > should include? > > > Rich > > > You can post your advice on the net (other fledgling Ada authors may be > watching) or send mail to me (indicate whether it is private or repostable). [Rich's sig deleted] Coding style is clearly a personal thing. I believe that it is much like handwriting. Each person develops a style of their own but is heavily influenced by styles to which they are initially exposed. In my own case, I tended to code in a FORTRANesque style until I took my first PASCAL course. Since PASCAL was free-form, I had to adapt. I've been following that style since. My point is that you should consider the influence of your style on the student's coding habits. My opinion is that you should follow some standard, preferably the LRM. If you feel that you cannot for pedagogical reasons, ****PLEASE SAY SO*** in your text so that the student can make their own decision. I prefer reserved words in boldface and mixed case identfiers. I believe that this style helps the student learn the symantics of the language. Mixed case for identifiers is more natural (English-like) and strikes me as less intimidating to the novice. My introductory texts used this style. I did not find the lack of "boldface" on my terminal an impediment. Good Luck with THE_BOOK, Dave