comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <marin.condic.auntie.spam@pacemicro.com>
Subject: Re: When to use 'Class in a parameter list
Date: Tue, 24 Jul 2001 13:16:32 -0400
Date: 2001-07-24T17:16:34+00:00	[thread overview]
Message-ID: <9jkahi$17u$1@nh.pace.co.uk> (raw)
In-Reply-To: 9jk3lr$ki0$1@news.huji.ac.il

...And then it hit me like the wet kiss at the end of a fist....
(Lightbulb!) Ahhhhhh! Its all coming back to me as if out of an alcoholic
stupor...

O.K. This has me pretty much back on track. I want the class-wide flavor if
inside the routine I want to generalize some part of the operation and
possibly dispatch to other operations that may depend on the specific type
of object sent in.

I really need to work with this stuff more than once a year... :-)

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/


"Ehud Lamm" <mslamm@mscc.huji.ac.il> wrote in message
news:9jk3lr$ki0$1@news.huji.ac.il...
>
>
> The way I explain it to my students is like this "from the 'outside' of
the
> class-wide routine there no dispatching" (i.e., no dispatching on call to
> the class-wide routine), "from the 'inside' you can have dispathcing, by
> calling the dispatching operations" (i.e, calls to primitive routine, made
> inside the class-wide routine).
> Notice that when you call a  routine that expect a specific type, from
> inside a class-wide routine you are, in a sense, giving a class-wide
> actual - and per the table above you may have dispatching.
>
> Another way at looking at this, is to realize that the class-wide
operation
> behave the same for all type in the hierarchy, up to calls to dispatching
> routines. The commonality is expressed by creating a class-wide routine;
the
> routine can be sensitive to the differences between the types in the
> hierarchy by calling type specific (dispatching) routines.
> Aside from the concept of "template function pattern", another common term
> is "factoring out common behaviours" - this may give a better idea what's
> this all about from a design POV.
>
> Ehud Lamm
>
>





  reply	other threads:[~2001-07-24 17:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-23 20:27 When to use 'Class in a parameter list Marin David Condic
2001-07-23 21:39 ` Ehud Lamm
2001-07-24 12:49   ` Marin David Condic
2001-07-24 14:39     ` Dmitry A. Kazakov
2001-07-24 15:16     ` Ehud Lamm
2001-07-24 17:16       ` Marin David Condic [this message]
2001-07-23 22:55 ` Stephen Leake
2001-07-25 19:20   ` Deligation with Ada95 Hans-Olof Danielsson
2001-07-26  2:06     ` Lao Xiao Hai
2001-07-24  2:22 ` When to use 'Class in a parameter list Vincent Marciante
2001-07-24 12:52   ` Marin David Condic
2001-07-24 14:36     ` Ed Falis
2001-07-24 15:29       ` Ehud Lamm
2001-10-29 22:52 ` Matthew Heaney
replies disabled

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