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,733faa8b7b00c147 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: basic ada question Date: 20 Aug 2005 10:28:29 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1124548109 9297 192.74.137.71 (20 Aug 2005 14:28:29 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 20 Aug 2005 14:28:29 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:4213 Date: 2005-08-20T10:28:29-04:00 List-Id: "Jeffrey R. Carter" writes: > Adrian Knoth wrote: > > > It is a named parameter. You can use it to rearrange the order > > of your parameters when calling a function/procedure. > > It's more about clarity than order. I strongly agree. Being "creative" with the order of parameters makes the code harder to read. Uniformity is good. I always use the same order in all calls -- same order as the formals are declared -- even when using named notation. At least, I try -- I wish the compiler would help me out by enforcing that. (Or give me a tool that fixes it.) >... Something like > > Insert (Into => Name_List, Item => Current.Name); > > is usually clearer than > > Insert (Name_List, Current.Name); Yes. I'm a big fan of named notation. Another advantage is when you have two parameters of the same type. You can't accidently switch them if you used named notation. I think you should choose formal parameter names that read nicely in named-notation calls (even if they cause the body of the procedure to be slightly less readable). - Bob