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-Thread: 103376,8b756d9a0afb052a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!nntp.abs.net!news.abs.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Quick question about Ada code formatting. References: <43F7915B.3090000@obry.net> <43F83D46.2090200@obry.net> <43F84890.7010900@obry.net> <43f871d8$0$491$9b4e6d93@newsread4.arcor-online.net> <43F872C4.50505@obry.net> From: Stephen Leake Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:6ImG4dJDaK9/7GGmy+Qohk5oErE= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 22 Feb 2006 17:21:16 -0500 NNTP-Posting-Host: 66.159.65.1 X-Complaints-To: abuse@toad.net X-Trace: news.abs.net 1140646884 66.159.65.1 (Wed, 22 Feb 2006 17:21:24 EST) NNTP-Posting-Date: Wed, 22 Feb 2006 17:21:24 EST Xref: g2news1.google.com comp.lang.ada:3076 Date: 2006-02-22T17:21:16-05:00 List-Id: Brian May writes: >>>>>> "Stephen" == Stephen Leake writes: > > >> ---------------------- > >> -- Process_Whatever -- > >> ---------------------- > >> > >> procedure Process_Whatever is > >> ... > >> > >> Far clearer than 2 blank lines IMHO. > > Stephen> Yuck - a waste of valuable screen space. That's what > Stephen> syntax colorization is for, along with navigation keys > Stephen> (page forward goes to next subprogram). > > If you have long functions (yes, this might be pure evil in itself), > then comments like the above help separate the different functions > (even with good colour scheme this isn't always easy, especially if > you have a lot of nested levels or even nested functions). Nonsense. The indentation says whether a particular function declaration is top-level or not. As others have pointed out, finding the top level function declaration is what IDE navigation is for; in my Emacs, 'M-page up' goes to the previous top-level function declaration. Having the block comment there adds no information. Please show an actual example where the comment adds information that is _not_ present in the indentation or keyword (presumed colorized). > However, the above is just asking for the comment to be expanded to > clearly describe what on earth "Process_Whatever" does, and why it is > different from the following procedures "Process_Whatever_2", > "Princess_Whatever3", or "process_what_Ever_4". No, that information belongs in the spec of the package. Well, it could be that Process_Whatever is local to the package body, and this _is_ the spec. Then there should be a comment describing it. > (yes; I do see some crazy names used in actual code, both open source > and closed source, that leave you thinking you know what a > subroutine/function does when you really don't) That's what code reviews are for :). -- -- Stephe