From: rob@brewster.demon.co.uk (Rob Heyes)
Subject: Re: use eiffel to build a CAM library?
Date: 1998/01/25
Date: 1998-01-25T00:00:00+00:00 [thread overview]
Message-ID: <MPG.f34f3483452b427989690@news.demon.co.uk> (raw)
In-Reply-To: tgmEnAEI4.G6J@netcom.com
In article <tgmEnAEI4.G6J@netcom.com>, tgm@netcom.com says...
> I disagree. If one's OO design operates purely in a synthetic domain,
> then callbacks may not be needed. But the real world is composed of
> data representations that must be cajoled into a format acceptable
> to OO techniques. Callbacks are most useful when attempting to parse
> non-OO streams in an OO fashion. Callbacks can be dispatched on some
> discriminant retrieved from the stream, rather than using ugly "if-then",
> "inspect", or "case" type techniques.
What stops you using an object instead of a function pointer? Provide an
abstract class that supplies the 'callback function' (and often
encapsulates other relevant data) then create descendant classes that
implement the 'callback' as appropriate. Or am I missing your point,
e.g. are you thinking of an OS routine that calls your code?
Rob Heyes
next prev parent reply other threads:[~1998-01-25 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-01-21 0:00 use eiffel to build a CAM library? Shane Miller
1998-01-22 0:00 ` Paul Johnson
1998-01-24 0:00 ` Thomas G. McWilliams
1998-01-25 0:00 ` Rob Heyes [this message]
1998-01-22 0:00 ` Thomas Beale
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox