comp.lang.ada
 help / color / mirror / Atom feed
* Private type definition must be definite : but why ?
@ 2008-03-02  0:23 Hibou57 (Yannick Duchêne)
  2008-03-02  0:37 ` Hibou57 (Yannick Duchêne)
  2008-03-02  0:43 ` Robert A Duff
  0 siblings, 2 replies; 4+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2008-03-02  0:23 UTC (permalink / raw)


Hello, hello...

I'm trying to express something I can't express with Ada semantic :

> package Xxx
>   type Data_Row_Type is private;
>   ...
> private
>   type Data_Row_Type is new String;
>   ...
> end Xxx;

Bu I cannot do that, beceause a private type definition must be
definite.

While I can do

> package Xxx
>   type Data_Row_Type is new String;
>   ...
> end Xxx;

I would like to understand the reason of this restriction. There is a
user view (the public part) and a compiler view (public part + private
part). So what's the matter if I want the user not to rely on the fact
that Data_Row_Type is a new String type, but still want the compiler
to know it. Why is it not allowed ?

What does justify the obligation for a private type to be definite ?

I do not see any reason at the time.

Thanks and good times to you

Yannick



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

end of thread, other threads:[~2008-03-03 16:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-02  0:23 Private type definition must be definite : but why ? Hibou57 (Yannick Duchêne)
2008-03-02  0:37 ` Hibou57 (Yannick Duchêne)
2008-03-03 16:29   ` Adam Beneschan
2008-03-02  0:43 ` Robert A Duff

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