comp.lang.ada
 help / color / mirror / Atom feed
From: "Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr>
Subject: Re: Interfacing with C ; an ununsed fields dilemma
Date: Thu, 2 Jul 2009 06:21:01 -0700 (PDT)
Date: 2009-07-02T06:21:01-07:00	[thread overview]
Message-ID: <9d9b5fe7-c990-4c67-9c6e-1dacd484b296@t21g2000yqi.googlegroups.com> (raw)
In-Reply-To: 4a4ca38d$0$31340$9b4e6d93@newsspool4.arcor-online.net

On 2 juil, 14:09, Georg Bauhaus <rm.dash-bauh...@futureapps.de> wrote:

> In case you are using current Ada, have you considered
> making your type limited an use a "construtor function"?http://www.adacore.com/2007/05/28/gem-3/

But this still allow an automatic instantion without the required
initialization.

On the other hand, I like this sentence in the document you've
pointed : “ After all, interesting types are usually private, and we
need some way for clients to create and initialize objects. ”

I oftenly feel the same, and I would probably have choose this design
if I were to create a specification from the ground up (perhaps I'm
driven into error by the existing C interface). Reading it in this
context, make me think that perhaps I should use a more abstract
specification, thus make these types (there are numerous records of
the same kind) fully private and define numerous accessors to each of
these types. I will no more bother to declare these unused fields, as
this would be now in the private part.



  reply	other threads:[~2009-07-02 13:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02  6:20 Interfacing with C ; an ununsed fields dilemma Hibou57 (Yannick Duchêne)
2009-07-02  9:25 ` Martin
2009-07-02 18:14   ` reserved fields; was " tmoran
2009-07-02  9:45 ` Maciej Sobczak
2009-07-02 12:01   ` Hibou57 (Yannick Duchêne)
2009-07-02 12:09     ` Georg Bauhaus
2009-07-02 13:21       ` Hibou57 (Yannick Duchêne) [this message]
2009-07-02 15:50         ` Georg Bauhaus
2009-07-02 14:52     ` Maciej Sobczak
2009-07-02 23:21       ` Hibou57 (Yannick Duchêne)
2009-07-03  7:21         ` Maciej Sobczak
2009-07-02  9:51 ` Georg Bauhaus
2009-07-02 10:16   ` Martin
2009-07-02 11:48     ` Hibou57 (Yannick Duchêne)
2009-07-02 15:55 ` Robert A Duff
2009-07-04  0:03   ` Randy Brukardt
2009-07-03  6:59 ` anon
replies disabled

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