Path: utzoo!utgpu!watserv1!watmath!att!cbnewsl!psrc From: psrc@cbnewsl.att.com (Paul S. R. Chisholm) Newsgroups: comp.object Subject: Re: What is Objective C? Summary: ah, but there *are* links between language and implementation Message-ID: <1990Sep4.034131.532@cbnewsl.att.com> Date: 4 Sep 90 03:41:31 GMT References: <3864@bingvaxu.cc.binghamton.edu> <2700002@hpspkla.spk.hp.com> <5524@stpstn.UUCP> Reply-To: psrc@mtunq.att.com (Paul S. R. Chisholm) Organization: AT&T Bell Laboratories Lines: 61 In article <401@eiffel.UUCP> bertrand@eiffel.UUCP (Bertrand Meyer) writes: > It is always surprising to see so many people confusing programming > languages and their implementations. . . . Why is that so? In article <5524@stpstn.UUCP>, cox@stpstn.UUCP (Brad Cox) writes: > I've wondered the same thing, Bertrand . . . I will try to post this entire article without giggling. Let me start out by pointing out that eiffel.uucp and stpstn.uucp are the Usenet systems of two companies which (currently) provide the sole implementations of their founders' respective object-oriented programming languages and/or environments. In these two cases, if one wants to use the one of the languages and/or environments in question, one will find that *the* (singular) implementation is tied very tightly to the language and/or environment. (The "and/or" stuff isn't meant to be stuffy. Dr. Cox has been very vocal that no programming language, not even Objective C, will bring about the kinds of improvements we'd all like to see; his company's product is a set of software components, written in a particular language, and a program that reads this language and produces object code.) There *are* languages with multiple implementations. C++ has been implemented by AT&T, Zortech, Oregon, GNU, and Borland, just to name companies that are reachable via the Internet. Parc Place Systems, Digitalk, and GNU all have Smalltalk implementations; they're all reachable electronically, though Digitalk hangs out on BIX, not the Internet or Usenet. (No, I don't have specific contacts for any of these guys!) If I have a Sun workstation or an MS-DOS system, I can choose between at least three implementations for my specific platform. And, yes, it makes less sense to ask, "Is C++ slower than C" than to ask "Does Turbo C++ 1.0 produce code as good as Turbo C 2.0's code?" And *any* language can, in theory and with enough work, be translated into better object code that that produced by a student compiler for . (Just go to comp.lang.lisp, where anyone will gladly promise you that their favorite Lisp processor generates better code than the World's Greatest Programmer writing tight, hand assembled code.-) HOWEVER! C++ was designed so "in theory and with enough work" requires very simple theory, and relatively little work. On the other hand, turning Smalltalk into something that will run as quickly as well compiled C on an 8088 with 640K is a *real* challenge. Maybe it's impossible without some language hacks. (I defer to A. Dain Samples, David Ungar, and Paul Hilfinger; see their "SOAR: Smalltalk Without Bytecodes" in the OOPSLA '86 Proceedings.) So . . . will a program that, by the language definition, must do garbage collection, run as quickly as a program where the "user" (the programmer in the language in question) must manage memory? Probably not, unless the language implementor has done a terrific job, and the "user" has botched it. Will a program that, by the language definition, must do an additional memory indirection, or even a table look up at run time, run as quickly as a program where subroutine calls can be translated straightforwardly into a subroutine call instruction? Same answer. Paul S. R. Chisholm, AT&T Bell Laboratories att!mtunq!psrc, psrc@mtunq.att.com, AT&T Mail !psrchisholm I'm not speaking for the company, I'm just speaking my mind.