* non key-words in xemacs to be upper case @ 1996-08-16 0:00 Frank.Bade 1996-08-16 0:00 ` David L Brown ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Frank.Bade @ 1996-08-16 0:00 UTC (permalink / raw) Help ! I am an ADA programmer and using xemacs 19.13. The ADA-Mode of the Xemacs formats the non key-words to the first character upper case and the rest lower case. Our S/W development bible tolds us to write those words completely upper case. Who can help me ? Frank ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-16 0:00 non key-words in xemacs to be upper case Frank.Bade @ 1996-08-16 0:00 ` David L Brown 1996-08-17 0:00 ` Robert Dewar 1996-09-01 0:00 ` Brian Rogoff 1996-08-17 0:00 ` j. doe 1996-08-19 0:00 ` David Wheeler 2 siblings, 2 replies; 11+ messages in thread From: David L Brown @ 1996-08-16 0:00 UTC (permalink / raw) >>>>> On 16 Aug 1996 10:22:24 GMT, bade@vicos_2.news (Frank.Bade) said: > I am an ADA programmer and using xemacs 19.13. The ADA-Mode of the > Xemacs formats the non key-words to the first character upper case > and the rest lower case. Our S/W development bible tolds us to write > those words completely upper case. Who can help me ? I assume this is the same in the ada-mode with xemacs as with emacs. There are a series of variables in ada-mode that define the casing of that emacs uses. I believe you want the following in your .emacs: (setq ada-case-identifier 'upcase-word) if you want attributes upcased too, you can do: (setq ada-case-attribute 'upcase-word) Dave Brown dbrown@vigra.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-16 0:00 ` David L Brown @ 1996-08-17 0:00 ` Robert Dewar 1996-08-19 0:00 ` Ken Garlington 1996-09-01 0:00 ` Brian Rogoff 1 sibling, 1 reply; 11+ messages in thread From: Robert Dewar @ 1996-08-17 0:00 UTC (permalink / raw) iDavid Brown says "> I am an ADA programmer and using xemacs 19.13. The ADA-Mode of the > Xemacs formats the non key-words to the first character upper case > and the rest lower case. Our S/W development bible tolds us to write > those words completely upper case. Who can help me ?" I guess your software bible also tolds you to misspell poor old Ada's name too right? You should wonder whether your software bible should be reconsidered. It is borrowing an Ada 83 convention that by now is pretty universally considered inappropriate. You might note that this all upper case style was never explicitly recommended even for Ada 83, it was just implicitly recommended by the examples in the RM. The history of this is that only two styles were seriously considered, o Keywords in all caps, identifiers in lower case o keywords in lower case, identifiers in all caps Some readability studies showed that the second is preferable (and looking at Mike Feldman's code, which uses all capital keywords, I have to agree, I find the all caps for keywords style horrible, and it is interesting to note that although I encouraged my students to follow any style they liked, as long as it was consistent, and although they had Mike's text book, not ONE decided to capitalie keywords! However, the general agreement these days is that neither of these styles is the right choice, and that instead almost all programmers prefer all lower case keywords and identifiers either in Mixed_Case or (I think it is a minority, but a noticable one) as MixedCase, followingh the Pascal style (which is also what MS follows in their API's). So I think you should consider revising your bible (take a look at the Ada 95 RM to see that its implicit recommendation is for Mixed_Case identifiers). ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-17 0:00 ` Robert Dewar @ 1996-08-19 0:00 ` Ken Garlington 1996-08-25 0:00 ` Robert Dewar 0 siblings, 1 reply; 11+ messages in thread From: Ken Garlington @ 1996-08-19 0:00 UTC (permalink / raw) Robert Dewar wrote: > > iDavid Brown says > > "> I am an ADA programmer and using xemacs 19.13. The ADA-Mode of the > > Xemacs formats the non key-words to the first character upper case > > and the rest lower case. Our S/W development bible tolds us to write > > those words completely upper case. Who can help me ?" > > I guess your software bible also tolds you to misspell poor old Ada's name > too right? Well, after all, Ada isn't a key-word, right? > You should wonder whether your software bible should be reconsidered. It is > borrowing an Ada 83 convention that by now is pretty universally considered > inappropriate. You might note that this all upper case style was never > explicitly recommended even for Ada 83, it was just implicitly recommended > by the examples in the RM. Here is a sample instantiation of the SPC's Ada 95 Quality & Style Guide: - Use lowercase for all reserved words (when used as reserved words) - Use mixed case for all other identifiers, a capital letter beginning every word separated by underscores - Use uppercase for abbreviations and acronyms (see automation notes) The guide does note, however, that people learning Ada may be better served by reading code where the reserved words are emphasized, and so a different convention may be useful when teaching Ada. -- LMTAS - "Our Brand Means Quality" ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-19 0:00 ` Ken Garlington @ 1996-08-25 0:00 ` Robert Dewar 1996-08-25 0:00 ` Michael Feldman 1996-08-29 0:00 ` Charles Lindsey 0 siblings, 2 replies; 11+ messages in thread From: Robert Dewar @ 1996-08-25 0:00 UTC (permalink / raw) Ken says 'The guide does note, however, that people learning Ada may be better served by reading code where the reserved words are emphasized, and so a different convent ion" This is a reaction to a strong reaction from Mike Feldman, who likes to teach Ada using ALL UPPER CASE KEYWORDS, and that is the way his book is written, but I strongly disagree with this, and it is interesting to note that not ONE of my students chose to follow this style (I let them choose their own style, as long as they are consistent). ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-25 0:00 ` Robert Dewar @ 1996-08-25 0:00 ` Michael Feldman 1996-08-29 0:00 ` Charles Lindsey 1 sibling, 0 replies; 11+ messages in thread From: Michael Feldman @ 1996-08-25 0:00 UTC (permalink / raw) In article <dewar.840990407@schonberg>, Robert Dewar <dewar@cs.nyu.edu> wrote: >Ken says > >'The guide does note, however, that people learning Ada may be better served by >reading code where the reserved words are emphasized, and so a different convent >ion" > >This is a reaction to a strong reaction from Mike Feldman, who likes to >teach Ada using ALL UPPER CASE KEYWORDS, and that is the way his book is >written, but I strongly disagree with this, and it is interesting to note >that not ONE of my students chose to follow this style (I let them choose >their own style, as long as they are consistent). Your students (at least so far) have been in courses at least at CS2 level. It will be interesting to see whether your newbies also choose to go against the book. I also let students choose their own style, as long as it is consistent. My CS1 (no programming experience) students usually go with the style in the textbook, especially becauyse my projects often involve modifying my code, which is online. So the lazy, easy way to be consistent is just to use my upper-case style. The RM clearly indicates that Ada source code is case-insensitive, so lexical style is purely up to the programmer (or project) taste. I don't know why we even continue to debate it. I write books for students with NO programming experience, and follow that (still large) segment of the Pascal community that believes upper case reserved words assist such people in the learning process. My CS2 book also uses upper case, just for consistency with the CS1 book. I have NEVER argued that it's a good style for everyone, only for first-year students. Anyone past that point can damn well pick their own style. BTW - I've been translating Macintosh GUI-using examples, straight from Apple's example distribution, into Ada. I'm using the Pascal form because it's easier to translate semi-mechanically than the C form is. I was surprised to discover that these examples - pitched at experienced programmers who are just learning the Apple API - use upper-case reserved words consistently. The point is that it really doesn;t matter. AQ&S merely states that some may prefer upper-case reserved words. That is true, and Ada allows it. It doesn;t force you, so why on EARTH do we waste time continuing Mike Feldman ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-25 0:00 ` Robert Dewar 1996-08-25 0:00 ` Michael Feldman @ 1996-08-29 0:00 ` Charles Lindsey 1996-08-31 0:00 ` Robert Dewar 1 sibling, 1 reply; 11+ messages in thread From: Charles Lindsey @ 1996-08-29 0:00 UTC (permalink / raw) In <dewar.840990407@schonberg> dewar@cs.nyu.edu (Robert Dewar) writes: >This is a reaction to a strong reaction from Mike Feldman, who likes to >teach Ada using ALL UPPER CASE KEYWORDS, and that is the way his book is >written, but I strongly disagree with this, and it is interesting to note >that not ONE of my students chose to follow this style (I let them choose >their own style, as long as they are consistent). FWIW, I follow the Mike Feldman approach. Perhaps its my ALGOL 68 upbringing :-). What I certainly do NOT like is the opposite convention of using lower-case reserved words, as was done in the LRM. -- Charles H. Lindsey ------------------------------------------------------------- At Home, doing my own thing. Internet: chl@clw.cs.man.ac.uk Voice/Fax: +44 161 437 4506 Janet: chl@uk.ac.man.cs.clw Snail: 5 Clerewood Ave., CHEADLE, SK8 3JU, U.K. UUCP: mucs!clerew!chl ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-29 0:00 ` Charles Lindsey @ 1996-08-31 0:00 ` Robert Dewar 0 siblings, 0 replies; 11+ messages in thread From: Robert Dewar @ 1996-08-31 0:00 UTC (permalink / raw) Charles said "FWIW, I follow the Mike Feldman approach. Perhaps its my ALGOL 68 upbringing :-). What I certainly do NOT like is the opposite convention of using lower-case reserved words, as was done in the LRM." In my experience anyone can get used to almost any convention. What is valuable is for everyone to use the same convention, so that silly disagreements on capitalization conventions do not get in the way of code sharing etc. It seems clear that the Ada community largely prefers lower case keywords and mixed case identifiers. I think it is a good idea if the minority that likes other conventions makes an effort to shift. I can say this, because I certainly used to be in this minority, and used to use lower case keywords and ALL UPPER CASE IDENTIFIERS. At first it was painful to switch to Mixed_Case_Identifiers, but now I am completely used to it. What I particularly dislike about Mike's book is that it deliberately departs from standard Ada practice, for what I consider are insufficiently good reasons. It would be as though someone wrote a C book in which they recommended using mixed case for macro names. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-16 0:00 ` David L Brown 1996-08-17 0:00 ` Robert Dewar @ 1996-09-01 0:00 ` Brian Rogoff 1 sibling, 0 replies; 11+ messages in thread From: Brian Rogoff @ 1996-09-01 0:00 UTC (permalink / raw) dewar@cs.nyu.edu (Robert Dewar) writes: In my experience anyone can get used to almost any convention. What is valuable is for everyone to use the same convention, so that silly disagreements on capitalization conventions do not get in the way of code sharing etc. It seems clear that the Ada community largely prefers lower case keywords and mixed case identifiers. I think it is a good idea if the minority that likes other conventions makes an effort to shift. I completely agree with this, the AQAS style guidelines seem pretty good to me. I was using the Smalltalk/ObjC/Java naming style before, and I switched over easily. I made the switch because I use Norman Cohen's book as my main Ada reference and I wanted my conventions to reflect the (Ada programming community) majority choice. I'd like to add that I think that there may be more to this matter than simply following the whims of the majority to make ease code sharing, which would be a great reason regardless. There is a large amount of accumulated wisdom in graphic design, particularly typography, which could be applied here. There are probably more than a few people on this newsgroup who can recall reading a math text which looks like it was typeset on a typewriter (e.g. Keisler's "Foundations of Infinitesimal Calculus"). It looked like crap, no matter how good the content was. So type (the other kind of type ;-) choice matters, when it comes to readability. When I look through some of the Ada texts on the bookshelves, the ones whose typesetting I find most appealing are the ones which adhere to AQAS naming style and use boldface, rather than caps, to set off reserved identifiers. This is much nicer to read than using single weight and all caps. This seems to be the style that quite a few Ada 95 book authors have adopted. It is also my choice for reading Ada code. I saw one book that used bold lower case for reserved words and all caps for variables and functions, I think, and I recall that I still didn't like the all caps, but that using boldface helped a bit. I notice that the Cohen and Barnes seem to prefer san-serif fonts for code. I am not convinced that this is best. Any informed opininons? What about other books? -- Brian ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-16 0:00 non key-words in xemacs to be upper case Frank.Bade 1996-08-16 0:00 ` David L Brown @ 1996-08-17 0:00 ` j. doe 1996-08-19 0:00 ` David Wheeler 2 siblings, 0 replies; 11+ messages in thread From: j. doe @ 1996-08-17 0:00 UTC (permalink / raw) To: Frank.Bade well, aside from the fact that you're bible is wrong!!! (only joking. don't want to start any religious arguments here...) try setting the variable ada-case-identifier in your ada-mode-hook to be upcase-word. the following is how i forced attributes to be all upper case. (setq ada-mode-hook '(lambda nil (setq ada-case-attribute 'upcase-word))) just put that line in your .emacs (or in a file loaded by your .emacs) . --johndoe ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: non key-words in xemacs to be upper case 1996-08-16 0:00 non key-words in xemacs to be upper case Frank.Bade 1996-08-16 0:00 ` David L Brown 1996-08-17 0:00 ` j. doe @ 1996-08-19 0:00 ` David Wheeler 2 siblings, 0 replies; 11+ messages in thread From: David Wheeler @ 1996-08-19 0:00 UTC (permalink / raw) Frank.Bade (bade@vicos_2.news) wrote: : Help ! : I am an ADA programmer and using xemacs 19.13. The ADA-Mode of the : Xemacs formats the non key-words to the first character upper case and : the rest lower case. : Our S/W development bible tolds us to write those : words completely upper case. Who can help me ? That's a pretty old convention, rarely used nowadays. I wouldn't be surprised if the rest of your "bible" is archaic, too. Most Ada users nowadays use the "Ada Quality and Style Guide" (AQ&S) as their basic style guide. It has lots of good information and only a small part of it discusses case and indenting issues (which really aren't all THAT important anyway). For more information on AQ&S, see http://lglwww.epfl.ch/Ada/Resources/References/html#style The AQ&S recommends lower case keywords, mixed case identifiers. Even the older Ada 83 version 2.01.01 recommends that (paragraph 3.1.3), and the Ada 95 version continues to recommend it. --- David A. Wheeler Net address: wheeler@ida.org ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~1996-09-01 0:00 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1996-08-16 0:00 non key-words in xemacs to be upper case Frank.Bade 1996-08-16 0:00 ` David L Brown 1996-08-17 0:00 ` Robert Dewar 1996-08-19 0:00 ` Ken Garlington 1996-08-25 0:00 ` Robert Dewar 1996-08-25 0:00 ` Michael Feldman 1996-08-29 0:00 ` Charles Lindsey 1996-08-31 0:00 ` Robert Dewar 1996-09-01 0:00 ` Brian Rogoff 1996-08-17 0:00 ` j. doe 1996-08-19 0:00 ` David Wheeler
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox