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: "Thomas G. McWilliams" Subject: Re: use eiffel to build a CAM library? Date: 1998/01/24 Message-ID: #1/1 X-Deja-AN: 318835418 Sender: tgm@netcom16.netcom.com References: Organization: Anacanapona Ltd. Newsgroups: comp.lang.eiffel,comp.lang.ada Date: 1998-01-24T00:00:00+00:00 List-Id: Paul Johnson wrote: : OO designs don't use callbacks in the C way: you should use inheritance : and polymorphism instead. These play similar tricks with function : pointers behind the scenes, but you don't need to worry about that. 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. The weakness of all OO languages seems to be the lack of a general high-level way to describe the mapping of non-OO stream data into objects. Ada is better than most in this respect, but it is still has a long way to go.