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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6aa1ec264ce25142 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.216.84.129 with SMTP id s1mr227650wee.2.1346980966297; Thu, 06 Sep 2012 18:22:46 -0700 (PDT) Path: q11ni5513255wiw.1!nntp.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!news.stw-bonn.de!news-1.dfn.de!news.dfn.de!news.uni-weimar.de!not-for-mail From: stefan-lucks@see-the.signature Newsgroups: comp.lang.ada Subject: Re: Real syntax problems in Ada Date: Wed, 29 Aug 2012 19:51:06 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: <1p5r39cusgc1n$.18nj9sytckk6$.dlg@40tude.net> <289703e7-1fba-41ce-b781-9e58ff2ec7df@googlegroups.com> <1w3xr2kbz8a19$.wpfoz4p1j1sb.dlg@40tude.net> <503e1a1d$0$6572$9b4e6d93@newsspool3.arcor-online.net> Reply-To: stefan-lucks@see-the.signature NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 X-Trace: tigger.scc.uni-weimar.de 1346265930 15539 141.54.178.228 (29 Aug 2012 18:45:30 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Wed, 29 Aug 2012 18:45:30 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: <503e1a1d$0$6572$9b4e6d93@newsspool3.arcor-online.net> Content-Type: TEXT/PLAIN; charset=US-ASCII Date: 2012-08-29T19:51:06+02:00 List-Id: On Wed, 29 Aug 2012, Georg Bauhaus wrote: > On 29.08.12 12:43, stefan-lucks@see-the.signature wrote: > > generic > > type Item is private; > > type Many_Items is array(Positive range <>) of Item; > > with function "<"(Left, Right: Item) return Boolean is <>; > > function Minimum(List: Many_Items) return Item; > > > > Ask programmers without Ada experience what this is. Most would read this > > as a generic declaration of something -- but how many would read this as > > the generic declaration of a function called "Minimum"? > > It is good to see a reference to at least one of the touchstones > of readability. What do you mean by "touchstones of readability"? In any case. "Normal" declarations have *first* what is declared (e.g., "function", then the name, and then the parameter list. Which is logical -- you first need to know what is declared, before you care about the parameter list. Generic declarations have first the parameter list (well, after the keyword "generic"), and only then *what* is declared. This is convoluted and ill readable. Or am I the only one who dislikes jumping from "generic" down to "function" and then back to the line below "generic" when reading stuff like the above? (Especially, of course, when the paramter list is longer than just the 3 lines above ...) -- ---- Stefan.Lucks (at) uni-weimar.de, University of Weimar, Germany ---- ------ I love the taste of Cryptanalysis in the morning! ------