From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: Type of the target of an assignment shall not be abstract
Date: Tue, 16 Feb 2010 02:03:38 -0800 (PST)
Date: 2010-02-16T02:03:38-08:00 [thread overview]
Message-ID: <bb14092c-3a1a-48fd-88de-69bf8b719ed6@g19g2000yqe.googlegroups.com> (raw)
In-Reply-To: fbc13ca9-5967-42f4-8efd-b423672c3dab@z10g2000prh.googlegroups.com
On 16 Feb., 01:59, Adam Beneschan <a...@irvine.com>:
> FYI, I asked about this on Ada-Comment, and got a response from
> Randy. [...]
Thanks!
IHMO, no need to worry about how well or not the standard handles
that.
To answer my original question, can I conclude that GNAT is wrong on
that case, and that I can send a report ?
> My own recommendation: If you want the 14 components of the abstract
> type Excel_Out_Stream to be treated as a unit, then make them a unit---
> i.e. define a record type with 14 components, and then
> Excel_Out_Stream would have just one component of that record type.
> Of course, that decision probably has to be made when the package is
> first written; making that change now would require changing how all
> those components are accessed everywhere else in the program. Barring
> that, you can either write 14 assignment statements and hope the
> compiler is smart enough to optimize them, or you can use a "trick"
> like Dmitry's suggestion, which will "work" but (in my opinion)
> doesn't help set up a type structure that accurately reflects the
> concepts in your program.
Sure, but isn't your recommendation a trick as well ?
Then I should write xl.X.blabla all over the package's body (where X
is the record type you suggest).
That for sure will pervert the concepts, readability, etc.
Choosing between both tricks, I'd prefer Dmitry's.
I'll give a clear name to the concrete-before-abstract type, like
"Pre_Root", and try to have it private.
Let's see how it turns out...
Thanks
Gautier
next prev parent reply other threads:[~2010-02-16 10:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-14 14:20 Type of the target of an assignment shall not be abstract Gautier write-only
2010-02-14 17:57 ` Dmitry A. Kazakov
2010-02-15 17:05 ` Adam Beneschan
2010-02-15 19:00 ` Hibou57 (Yannick Duchêne)
2010-02-23 21:19 ` Robert A Duff
2010-02-16 0:59 ` Adam Beneschan
2010-02-16 10:03 ` Gautier write-only [this message]
2010-02-16 12:14 ` Gautier write-only
2010-02-16 16:12 ` Adam Beneschan
2010-02-28 17:00 ` Gautier write-only
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox