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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6609c40f81b32989 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!g10g2000yqh.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Why is Ada considered "too specialized" for scientific use Date: Wed, 7 Apr 2010 04:59:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7276a247-2ad8-418e-b401-34a5d61c4166@g10g2000yqh.googlegroups.com> References: <602abc7e-afbe-4862-8885-b349ac4e6b90@r1g2000yqb.googlegroups.com> <0361da85-c24e-464d-a409-a370978638bc@b33g2000yqc.googlegroups.com> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1270641599 32013 127.0.0.1 (7 Apr 2010 11:59:59 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 7 Apr 2010 11:59:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g10g2000yqh.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:10882 Date: 2010-04-07T04:59:59-07:00 List-Id: On 7 Kwi, 10:24, "Dmitry A. Kazakov" wrote: > A reader would expect this procedure idempotent. Consider a program: > > =A0 =A0X; X; X; -- What does this do? This is the same as today with regular parameterless procedures: procedure X (Spacing : in Positive_Count :=3D 1) renames Ada.Text_IO.New_Line; Now, what the reader would expect from your example? > > =A0 =A0A :=3D Y; =A0 =A0 -- parameterless function call on Y > > I would prefer the ":=3D" (A, Y); interpretation, here. As I've pointed out, that would be resolved in the same way as overloading by return type. The ":=3D" (A, Y) interpretation might not match, whereas the overloaded function call on My_Other_Magic_Type might return the type that is appropriate for assignment to A. It's a regular overload resolution stuff. > > =A0 =A0B :=3D Y (3); -- function call on Y with one param > > Better it be ":=3D"(B, "index" (Y, 3)); Except that the notion of "index" might not be appropriate. Function is a more general term (indexing is a kind of function, but not the other way round). > The things you could do with your proposal could probably be achieved in > other ways. For example, I considered a "touch" primitive operation, whic= h > similarly to Adjust, to be called each time you access a volatile object = in > order to get its value. This could be useful for tracing, interlocking, > garbage collection, persistency layer purposes, etc. Except that with the overloaded function call operator, you would not need "touch", as the function body would be already a right place to put all such tracing. -- Maciej Sobczak * http://www.inspirel.com YAMI4 - Messaging Solution for Distributed Systems http://www.inspirel.com/yami4