comp.lang.ada
 help / color / mirror / Atom feed
* A non-primitive operation
@ 2017-11-14 19:44 Victor Porton
  2017-11-14 21:56 ` Dmitry A. Kazakov
  2017-11-15 22:37 ` Randy Brukardt
  0 siblings, 2 replies; 3+ messages in thread
From: Victor Porton @ 2017-11-14 19:44 UTC (permalink / raw)


I want a function F which returns a tagged type NOT to be considered as a 
primitive operation of T.

Is there any other way for this, except to declare F in a separate package?

What about creating F in a subpackage? This way it could have access to full 
view of T if T is private (an awful hack?):

package X is

  type T is tagged private;

  package Sub is
    function F return T;
  end Sub;

end X;

Are there other ways?

-- 
Victor Porton - http://portonvictor.org


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-15 22:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14 19:44 A non-primitive operation Victor Porton
2017-11-14 21:56 ` Dmitry A. Kazakov
2017-11-15 22:37 ` Randy Brukardt

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