Article View: comp.sw.components
Article #47Re: Inheritance vs. component effic
From: johnson
Date: Wed, 23 Aug 1989 13:55
Date: Wed, 23 Aug 1989 13:55
16 lines
1170 bytes
1170 bytes
Jonas Nygren shows that structures with pointers to functions handle my windowing example very well, and says that this proves that object-oriented programming can be simulated without case statements and that run-time binding is not needed. However, he proves my point. Calling a function stored in a structure IS run-time binding. He is just showing how to do object-oriented programming in C. It is fine to do object-oriented programming in C, and some people prefer that to using C++. Many, if not most, languages do not allow pointers to functions to be stored in structures. In particular, Ada does not. In those cases, you have to use case statements. Ralph Johnson
Technical Details
Message-ID:
<130200009@p.cs.uiuc.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!ginosko!usc!sdsu!bionet!csd4.csd.uwm.edu!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!m.cs.uiuc.edu!p.cs.uiuc.edu!johnsonReferences:
<1233@ttds.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ginosko!usc!sdsu!bionet!csd4.csd.uwm.edu!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!m.cs.uiuc.edu!p.cs.uiuc.edu!johnson From: johnson@p.cs.uiuc.edu Newsgroups: comp.sw.components Subject: Re: Inheritance vs. component effic Message-ID: <130200009@p.cs.uiuc.edu> Date: 23 Aug 89 13:55:00 GMT References: <1233@ttds.UUCP> Lines: 16 Nf-ID: #R:ttds.UUCP:1233:p.cs.uiuc.edu:130200009:000:683 Nf-From: p.cs.uiuc.edu!johnson Aug 23 08:55:00 1989