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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Possible for Ada 2020: "Cursors" for Arrays Date: Tue, 04 Jun 2013 21:27:32 +0200 Organization: Tidorum Ltd Message-ID: References: <55016aa4-4d69-4fd9-a2c9-a7eb7d3b00c5@googlegroups.com> <81fc9059-d18b-49ad-8375-d436587f19bf@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net elbfPlM3Dosg8QFW7K3vAQayRk0vSYQHv7ng6ni8ibleAdOys7 Cancel-Lock: sha1:tPaAwngVUmlO+MCmslPymA2lnoM= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: <81fc9059-d18b-49ad-8375-d436587f19bf@googlegroups.com> Xref: news.eternal-september.org comp.lang.ada:15699 Date: 2013-06-04T21:27:32+02:00 List-Id: On 13-06-04 16:18 , Shark8 wrote: > On Tuesday, June 4, 2013 12:19:00 AM UTC-6, Niklas Holsti wrote: >> >> I think it would be better to build this ability from syntax similar to >> the quantified expressions - "for all/some I in => ...". To >> avoid ambiguities when the array elements are Boolean we should use a >> new keyword instead of "all" or "some". > > Why would it matter syntax-wise? (that is, I don't see how there > would be a problem when the elements are a boolean-type for the > attribute form... I agree that the attribute form (T1'Cursor) would not be ambiguous, but I don't like that syntax, nor the use of "others" before it. Just my opinion, of course. One reason for my dislike is that the word "Cursor" is already in use for something more permanent (cursors to containers); another is the problem with unconstrained arrays that you already showed, a third reason is having to add a rule that the 'Cursor attribute can be used only in such aggregates. > that seems to only arise in a situation like you are proposing, > jumping off "for all"/"for some" syntactic constructs.) I believe that even using "for all" would not be strictly ambiguous, as long as one-element positional array aggregates remain forbidden. But it could be confusingly "almost" ambiguous. The form with no keyword "for I in " now seems best to me, and sufficiently clear and sufficiently far from ambiguity. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .