comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: Idiom for a class and an object in Ada
Date: Tue, 19 Oct 2004 10:44:04 -0400
Date: 2004-10-19T14:31:53+00:00	[thread overview]
Message-ID: <41752559$0$91011$39cecf19@news.twtelecom.net> (raw)
In-Reply-To: s78dd.2345$ta5.833@newsread3.news.atl.earthlink.net


"Marin David Condic" <nobody@noplace.com> wrote in message 
news:s78dd.2345$ta5.833@newsread3.news.atl.earthlink.net...
>
> Maybe my question isn't really clear. I'm thinking of something of the 
> flavor:
>
> package AD_Converter_Class is
>
>     type AD_Converter is tagged private ;
>
>     procedure Some_Op_Like_Read_The_AD_Converter (
>         Converter : in out AD_Converter) ;
>
> end AD_Converter_Class ;
>
> Don't get hung up on it being an AD converter. The question relates more 
> to the proper idiom for a class that might have one or a few static 
> objects (as opposed to anything I might dynamically create and destroy 
> through the life of a program) Where would the best place be to declare 
> the objects of that class assuming that the storage must be static?

First of all, if we're going to have a conversation, we need to agree on 
terms.

The term "class" in Ada has a very specific meaning.  In Ada, it means 
"family of types."  Specifically, it means "family of tagged types, having 
this common ancestor."

You said above "proper idiom for a class," but it's not clear whether you 
just mean "type," or whether you mean "class" (as in "family of types").  If 
you just mean "type," then say so.

It certainly doesn't help anyone that you named the package 
AD_Converter_Class.  In fact it's horribly confusing.  Please use Ada terms, 
or I won't understand you.  Don't say "class" if you mean "type."

Secondly, you haven't explained why your AD_Converter type is tagged, or why 
it's non-limited.  (What does assignment of AD_Converter objects even 
mean???)

Please give me a reason why this type is tagged, and if it's tagged then 
please tell me about its descendents.



> What is the preferred Ada idiom for something like this?

I showed you the proper idiom.  What's the problem?






  reply	other threads:[~2004-10-19 14:44 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-18 11:47 Idiom for a class and an object in Ada Marin David Condic
2004-10-18 12:14 ` Martin Krischik
2004-10-18 19:40   ` Matthew Heaney
2004-10-19 12:59   ` Marin David Condic
2004-10-19 14:46     ` Martin Dowie
2004-10-19 15:55       ` Matthew Heaney
2004-10-19 18:31         ` Martin Dowie
2004-10-19 15:52     ` Matthew Heaney
2004-10-18 12:26 ` Marius Amado Alves
2004-10-19  2:09   ` Jeffrey Carter
2004-10-19  3:28     ` Matthew Heaney
2004-10-19 12:53       ` Marin David Condic
2004-10-19 14:44         ` Matthew Heaney [this message]
2004-10-19 15:01           ` Dmitry A. Kazakov
2004-10-19 15:40             ` Matthew Heaney
2004-10-20  7:58               ` Dmitry A. Kazakov
2004-10-20 12:31                 ` Marin David Condic
2004-10-20 13:53                   ` Dmitry A. Kazakov
2004-10-20 15:23                   ` Matthew Heaney
2004-10-21 12:24                     ` Marin David Condic
2004-10-21 17:15                       ` Matthew Heaney
2004-10-20  5:39         ` Simon Wright
2004-10-20  7:24           ` Matthew Heaney
2004-10-20  8:39             ` Dmitry A. Kazakov
2004-10-21  1:36             ` Jeffrey Carter
2004-10-21  1:46               ` Matthew Heaney
2004-10-21  7:51                 ` Dmitry A. Kazakov
2004-10-21 12:45                   ` Matthew Heaney
2004-10-21 14:11                     ` Dmitry A. Kazakov
2004-10-22  1:04                 ` Jeffrey Carter
2004-10-22  1:36                   ` Matthew Heaney
2004-10-21 19:31               ` Kevin Cline
2004-10-21 22:02                 ` Matthew Heaney
2004-10-22  0:10                   ` Matthew Heaney
2004-10-21  8:25             ` Martin Dowie
2004-10-20 17:04           ` Matthew Heaney
2004-10-20 19:37             ` Simon Wright
2004-10-20 20:04               ` Matthew Heaney
2004-10-22  5:37                 ` Simon Wright
2004-10-20  1:10       ` Jeffrey Carter
2004-10-20  7:04         ` Matthew Heaney
2004-10-20 12:42           ` Marin David Condic
2004-10-20 12:55             ` Matthew Heaney
2004-10-20 15:27             ` Matthew Heaney
2004-10-21  1:36               ` Matthew Heaney
2004-10-19 12:38   ` Marin David Condic
2004-10-18 16:59 ` Matthew Heaney
2004-10-18 18:02 ` Martin Dowie
2004-10-19 13:06   ` Marin David Condic
2004-10-19 14:51     ` Martin Dowie
2004-10-20 16:20 ` Michael Paus
2004-10-20 17:15   ` Matthew Heaney
2004-10-20 17:55     ` Michael Paus
2004-10-21 12:33   ` Marin David Condic
  -- strict thread matches above, loose matches on Subject: below --
2004-10-21 13:59 Stephen Leake
replies disabled

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