comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Is this an error in compiler
Date: Sun, 11 Sep 2022 17:44:13 +0300	[thread overview]
Message-ID: <jo6ahtFfaipU1@mid.individual.net> (raw)
In-Reply-To: <tfkkcj$1talo$1@dont-email.me>

On 2022-09-11 15:30, Jeffrey R.Carter wrote:
> On 2022-09-11 10:10, Simon Wright wrote:
>>
>> I have to say these conditional constructs strike me as regrettable
>> Perl-isms, and reduce clarity:
>>
>>     return foo when blah;
>>     raise baz when quux;
> 
> I presume you never use
> 
> exit Name when Condition;
> 
> since it must reduce clarity as well.
> 
> I suggested these constructs for Ada 9X. They were rejected because you 
> could get the same functionality with an if statement, and the ARG had 
> more important things to spend their time on. I guess the ARG's workload 
> must have decreased.


I don't find these "raise .. when" or "return .. when" constructs in the 
Ada 2022 RM draft, so I don't think the ARG has adopted them (yet). I 
suspect they are GNAT extensions, as is the ability to make a subtype of 
String with a fixed lower index bound of 1 but an unconstrained upper 
bound (1 .. <>), as also done in the OP's code.

I would not use these non-standard GNAT extensions, as long as GNAT is 
not the only Ada compiler in the world, which it fortunately isn't.


  parent reply	other threads:[~2022-09-11 14:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-11  7:19 Is this an error in compiler reinert
2022-09-11  8:10 ` Simon Wright
2022-09-11 10:52   ` reinert
2022-09-11 12:30   ` Jeffrey R.Carter
2022-09-11 12:59     ` Dmitry A. Kazakov
2022-09-11 14:44     ` Niklas Holsti [this message]
2022-09-11 15:47       ` Jeffrey R.Carter
2022-09-11 16:47         ` reinert
2022-09-11 17:18           ` Dmitry A. Kazakov
2022-09-12  7:05       ` Simon Wright
2022-09-11 15:14   ` Oliver Kellogg
replies disabled

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