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: a07f3367d7,380d5dcaa525139c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.94.8 with SMTP id cy8mr9934938wib.1.1356837411868; Sat, 29 Dec 2012 19:16:51 -0800 (PST) Path: i11ni337243wiw.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!newsfeed.straub-nv.de!reality.xs3.de!news.jacob-sparre.dk!hugin.jacob-sparre.dk!news.thorslund.org!pnx.dk!not-for-mail From: Gustaf Thorslund Newsgroups: comp.lang.ada Subject: Re: X : Real_Vector := Solve(A => A, X => B); -- Why X as argument name? Date: Mon, 24 Dec 2012 22:25:53 +0100 Organization: gustaf.thorslund.org Message-ID: <87ip7rkuqm.fsf@katthult.thorslund.org> References: <871uegmmiq.fsf@katthult.thorslund.org> NNTP-Posting-Host: localhost Mime-Version: 1.0 X-Trace: katthult.thorslund.org 1356384353 30306 ::1 (24 Dec 2012 21:25:53 GMT) X-Complaints-To: usenet@thorslund.org NNTP-Posting-Date: Mon, 24 Dec 2012 21:25:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:w75+cabCii6x0XPUR+RXaKVrx0g= Content-Type: text/plain; charset=us-ascii Date: 2012-12-24T22:25:53+01:00 List-Id: Simon Wright writes: > Niklas Holsti writes: > >> Or do you mean to ask if it was a mistake in the definition of >> Ada.Numerics.Real_Arrays.Solve to give the second formal parameter the >> name "X", given that "X" is a common name in client code? > > This is certainly a style issue. The second parameter has been 'X' ever > since it was introduced in v4 of ai-00296 in June 2003[1]. I would > probably have chosen 'B', but there may well be mathematical texts that > would take the approach adopted in the ARM. Thanks for the link! So then we are three who would have chosen 'B' over 'X'. I'm curious why 'X' was chosen. But whatever the reason was it's already done. > It's very common for mathematical code to adopt terse naming, in line > with the way mathematicians seem to work, and I find it hard to think of > sensible names for these parameters. But it ought to be possible for > client code to be more explicit (unless, of course, the algorithm to be > implemented was specified by one of the above-referenced mathematicians!) When it comes to an abstract generic level it may be hard to come up with more explicit names. A queue will have a head and tail (or some other names). Depending on application it may be good or bad to be first. /Gustaf