Xref: utzoo comp.lang.c++:12133 comp.object:2697 comp.lang.objective-c:193 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!news!nujoizey!gwu From: gwu@nujoizey.tcs.com (George Wu) Newsgroups: comp.lang.c++,comp.object,comp.lang.objective-c Subject: Re: Static typing, OOP efficiency, and programmer error Message-ID: <1861@news.tcs.com> Date: 8 Mar 91 16:37:27 GMT References: <27C523A2.2155@tct.uucp> <27CE9C05.4F64@tct.uucp> Sender: root@tcs.com Reply-To: gwu@nujoizey.tcs.com (George Wu) Followup-To: comp.lang.c++ Organization: Teknekron Communications Systems Lines: 43 - Please forgive me if this message appears twice. My machine croaked at precisely the wrong time. I'll ignore the hint, if you don't mind. :-) In article <27CE9C05.4F64@tct.uucp>, chip@tct.uucp (Chip Salzenberg) writes: |> According to pcg@cs.aber.ac.uk (Piercarlo Grandi): |> |> chip> Besides, as far as I know, there is no guarantee that the message |> chip> set supported by a given class will not expand after the users of |> chip> that class have already been compiled. |> |> pcg> The idea in Objective C is that you resolve statically what you can, and |> pcg> turn to dynamic overloading for what you cannot. |> |> But the Objective C compiler never knows when you have made an error |> by sending a message that the recipient cannot understand. That error |> is impossible in a C++ program. |> |> pcg> ... [in Objective C, a message] just gets resolved dynamically instead of |> pcg> statically. In C++ you simply don't have this option in the general case. |> |> True. I consider this omission a feature, personally; it keeps me |> from discovering at run-time that I have requested an impossible |> operation -- an error the compiler could have detected. For commercial systems, to say nothing of mission critical applications, run-time error generation is a drawback. I'm sure there are poeple out there using Objective-C, Smalltalk, and Lisp to develop commercial systems, and what's a core dump but a run-time error, but it is always better to get as much error checking done at the compile stage. The mere potential for run-time errors implies more testing and less overall confidence in the stability of an application, to be avoided where possible for commercially delivered applications. George ---- George J Wu, Software Engineer | gwu@tcs.com or uunet!tcs!gwu Teknekron Communications Systems, Inc.| (415) 649-3752 2121 Allston Way, Berkeley, CA, 94704 | Quit reading news. Get back to work.