Private type definition must be definite : but why ?
by "=?ISO-8859-1?Q?Hibou57_(Yannick_Duch=EAne)?=" <yannick_duchene@[EMAIL PROTECTED]
Mar 1, 2008 at 04:23 PM
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