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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,73f15dbe4ec16d06 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-04 10:28:39 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Adding "()" operator to Ada 200X Date: 4 Jun 2003 10:28:39 -0700 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0306040928.6eb47667@posting.google.com> References: <1ec946d1.0306021542.58714996@posting.google.com> <1325634.ddflWlv0t0@linux1.krischik.com> NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1054747719 26606 127.0.0.1 (4 Jun 2003 17:28:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 4 Jun 2003 17:28:39 GMT Xref: archiver1.google.com comp.lang.ada:38624 Date: 2003-06-04T17:28:39+00:00 List-Id: Martin Krischik wrote in message news:<1325634.ddflWlv0t0@linux1.krischik.com>... > > I agree with your point and put my vote in favour of the O.P.: An array > operator would make collection classes much nicer. The problem is what type to return. In C++ I do this: T& operator[](); const T& operator[]() const; The operator returns a reference to T. There are no reference types in Ada, so it's not obvious how the language would be able to provide it.