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-7-bit Path: g2news1.google.com!postnews.google.com!b33g2000yqc.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 00:28:22 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0361da85-c24e-464d-a409-a370978638bc@b33g2000yqc.googlegroups.com> References: <602abc7e-afbe-4862-8885-b349ac4e6b90@r1g2000yqb.googlegroups.com> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1270625302 7407 127.0.0.1 (7 Apr 2010 07:28:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 7 Apr 2010 07:28:22 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b33g2000yqc.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: g2news1.google.com comp.lang.ada:9907 Date: 2010-04-07T00:28:22-07:00 List-Id: On 6 Kwi, 10:07, Maciej Sobczak wrote: > It is only a pity that there would be no way to overload a function > call operator for the parameterless case. ;-) Heck, when I think more about this it seems that even this would be possible by analyzing the context of the given expression. That would work in a similar way as overloading on return types. For example, assuming that My_Magic_Type has an overloaded procedure call operator and My_Other_Magic_Type has an overloaded function call operator: declare X : My_Magic_Type; Y : My_Other_Magic_Type; begin X; -- parameterless procedure call on X A := Y; -- parameterless function call on Y X (1, 2); -- procedure call on X with two params B := Y (3); -- function call on Y with one param end; But I'm not really sure if that would be actually useful in the context of other Ada features. Especially - the only place where it would make sense is with generics, but then their specification syntax would blow up even more. You cannot have everything, I guess... -- Maciej Sobczak * http://www.inspirel.com YAMI4 - Messaging Solution for Distributed Systems http://www.inspirel.com/yami4