comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adambeneschan@aol.com>
Subject: Re: Private function w/ Tagged return-type.
Date: Mon, 29 Jul 2013 14:27:38 -0700 (PDT)
Date: 2013-07-29T14:27:38-07:00	[thread overview]
Message-ID: <1cb5731e-2936-42ca-89f3-0ca21776b9c9@googlegroups.com> (raw)
In-Reply-To: <64498c9c-7add-4b4e-a592-51e12e1aeba6@googlegroups.com>

On Monday, July 29, 2013 2:20:24 PM UTC-7, I wrote:

> You can put your Input function in a nested package to avoid the error, since that will make it non-primitive.

By the way, now that Ada has aspect clauses, I've toyed with the idea of asking for a Non_Primitive aspect so that you can declare that a subprogram is non-primitive even if the rules in 3.2.3 would make it primitive.  This issue has come up multiple times, where a programmer wants to declare a non-dispatching subprogram (or a subprogram with parameters of two different tagged types declared in the same package) but gets defeated by this rule.  You can get around this by nesting it in a subpackage, but this seems like a kludge that shouldn't be necessary any more if an aspect clause were added.  (Also, I'd ask for Non_Primitive=>True rather than Primitive=>False, even though the latter looks better, because I'm not sure if there's any other case where the *default* value for an aspect could be true.  Also, this is a one-way street; there is no reason I can see to allow a "Primitive=>True" aspect on subprograms that would otherwise be non-primitive by 3.2.3.)

                                 -- Adam 
 

      reply	other threads:[~2013-07-29 21:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 20:54 Private function w/ Tagged return-type Shark8
2013-07-29 21:20 ` Adam Beneschan
2013-07-29 21:27   ` Adam Beneschan [this message]
replies disabled

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