Xref: utzoo comp.lang.c++:12318 comp.lang.objective-c:201 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!daver!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.lang.c++,comp.lang.objective-c Subject: Re: Static typing, OOP efficiency, and programmer error Message-ID: <27E17FD1.7241@tct.uucp> Date: 16 Mar 91 02:15:45 GMT References: <27CE9C05.4F64@tct.uucp> <1860@news.tcs.com> <47199@nigel.ee.udel.edu> Organization: Teltronics/TCT, Sarasota, FL Lines: 34 According to carroll@cis.udel.edu (Mark Carroll): >Most of the time, Objective-C is used in a way which could be trivially >translated into a fully static language like C++. In those cases, Objective-C >COULD catch any of the errors which C++ could catch. The key difference, as I understand it, is that the Objective-C language does not require the programmer to make available to the compiler that information that would make possible a complete check of message vs. object type. >... by using dataflow analysis to bind statically whenever possible, >any of the errors that could be caught statically in C++ could be caught >statically in Objective-C. I think that the above statement is incorrect. The C++ language is incapable of compiling a program that results in an object receiving a message it can't handle. Objective-C, on the other hand, is. Whether a given Objective-C compiler can sometimes, or even usually, notice that error is beside the point. In Objective-C the error is possible; in C++ it isn't. > Static versus dynamic binding is a matter of personal taste. That's an important issue, and one that doesn't get a lot of air time. But it's a significant factor in the early success or failure of any language. >I think that my programs are much more elegant written in a dynamic style ... I am not willing to sacrifice type safety for elegance. -- Chip Salzenberg at Teltronics/TCT , "Most of my code is written by myself. That is why so little gets done." -- Herman "HLLs will never fly" Rubin