comp.lang.ada
 help / color / mirror / Atom feed
From: "Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr>
Subject: Private type definition must be definite : but why ?
Date: Sat, 1 Mar 2008 16:23:01 -0800 (PST)
Date: 2008-03-01T16:23:01-08:00	[thread overview]
Message-ID: <074b2c5d-289c-42b1-bbf5-de9354f0ddcf@c33g2000hsd.googlegroups.com> (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



             reply	other threads:[~2008-03-02  0:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-02  0:23 Hibou57 (Yannick Duchêne) [this message]
2008-03-02  0:37 ` Private type definition must be definite : but why ? Hibou57 (Yannick Duchêne)
2008-03-03 16:29   ` Adam Beneschan
2008-03-02  0:43 ` Robert A Duff
replies disabled

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