From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,30cdfbb433fa5e47 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,30cdfbb433fa5e47 X-Google-Attributes: gid103376,public From: rob@brewster.demon.co.uk (Rob Heyes) Subject: Re: use eiffel to build a CAM library? Date: 1998/01/25 Message-ID: #1/1 X-Deja-AN: 319016706 References: X-NNTP-Posting-Host: brewster.demon.co.uk [158.152.22.218] Organization: Kallisti Systems Newsgroups: comp.lang.eiffel,comp.lang.ada Date: 1998-01-25T00:00:00+00:00 List-Id: In article , 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