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,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-04 19:18:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc02.POSTED!not-for-mail Message-ID: <3EDEA840.6020908@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X References: <6a90b886.0305262344.1d558079@posting.google.com> <3ED41344.7090105@spam.com> <3ED46D81.FF62C34F@0.0> <3ED46E07.4340CABC@0.0> <3ED4F3FD.A0EF7079@alfred-hilscher.de> <6vWcnTWjF83bD0qjXTWcpA@gbronline.com> <7vfzmr60r5.fsf@vlinux.voxelvision.no> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc02 1054779494 24.62.164.137 (Thu, 05 Jun 2003 02:18:14 GMT) NNTP-Posting-Date: Thu, 05 Jun 2003 02:18:14 GMT Organization: AT&T Broadband Date: Thu, 05 Jun 2003 02:18:14 GMT Xref: archiver1.google.com comp.lang.ada:38654 Date: 2003-06-05T02:18:14+00:00 List-Id: Russ wrote: > Your suggestion would require some sort of advanced artificial > intelligence to be built in to the compiler. The AI system would need > to perform a very complex analysis of the overloaded "+" operator and > decide how to deal with it. Been there, done that, got the coffee mug. Or didn't you realize that the current overload resolution algorithm essentially required for Ada compilers to pass the ACATS tests does just that? > The only other alternative would be to > have the "+" operator automatically defined for arrays. Either > approach would constitute a major change in philosophy for Ada. Hmmm. Predefined operators for two dimensional arrays would be a change. I don't think I'd consider it a major change. As for one dimensional arrays, catenation is defined for all such types, and the boolean operations "and", "or", and "not" are predefined for arrays of Boolean, or arrays of any type derived from Boolean. Adding predefined "+", "-", "*", "/", "mod", "rem", and "abs" wouldn't be much of a change at all. I don't think it will happen, since the current choices are well thought out--but if there was a reason to change things, I'm sure it would happen. The reason that the boolean operations are predefined for arrays is that it would be very difficult for a compiler to figure out the optimizations to use bit-wise operations on words otherwise. If the same sort of problem was found with using the SSE and SSE2 instructions on arrays of small integers, I'm sure the language would change.... Catenation on the other hand, is just too important an abstraction for one-dimensional arrays to leave out. For two dimensional arrays, it is a very uncommon operation.