comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Possible for Ada 2020: "Cursors" for Arrays
Date: Tue, 04 Jun 2013 21:27:32 +0200
Date: 2013-06-04T21:27:32+02:00	[thread overview]
Message-ID: <b16td4F9gmsU1@mid.individual.net> (raw)
In-Reply-To: <81fc9059-d18b-49ad-8375-d436587f19bf@googlegroups.com>

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 <range> => ...". 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 <range>" now seems best to me, and sufficiently clear and
sufficiently far from ambiguity.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
      .      @       .

  reply	other threads:[~2013-06-04 19:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04  1:09 Possible for Ada 2020: "Cursors" for Arrays Shark8
2013-06-04  6:19 ` Niklas Holsti
2013-06-04 14:18   ` Shark8
2013-06-04 19:27     ` Niklas Holsti [this message]
2013-06-04 20:47 ` Adam Beneschan
2013-06-06  8:58   ` Jacob Sparre Andersen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox