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: f43e6,c7b637f8b783b7c X-Google-Attributes: gidf43e6,public X-Google-Thread: fac41,c7b637f8b783b7c X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,c7b637f8b783b7c X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,c7b637f8b783b7c X-Google-Attributes: gid1108a1,public X-Google-Thread: 107d55,c7b637f8b783b7c X-Google-Attributes: gid107d55,public X-Google-Thread: 109fba,c7b637f8b783b7c X-Google-Attributes: gid109fba,public From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) Subject: Re: The great Java showcase (re: 2nd historic mistake) Date: 1997/08/28 Message-ID: <5u3e63$8gn$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 268728800 References: <34023FC9.59E2B600@eiffel.com> <872652486.17137@dejanews.com> <5u0nil$atg@mulga.cs.mu.OZ.AU> Organization: Comp Sci, RMIT University, Melbourne, Australia. NNTP-Posting-User: ok Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel,comp.lang.java.tech,comp.lang.c++ Date: 1997-08-28T00:00:00+00:00 List-Id: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) writes: >Objective-C was not better than C++. Well, it depends on what you mean by "better". - Cheaper to enter? Someone here wrote an Objective C compiler in a couple of months spare time several years ago. You got more OOP bang for the compiler development buck. - Compiler reliability? _Because_ the job of an Objective-C compiler is much much simpler than the job of a C++ compiler, you get rather more compiler reliability for the same level of investment. - Library design? The Objective-C libraries were designed with the language, just like Eiffel. Unfortunately, a split developed, with StepStone owning the original libraries, and other free libraries being developed, which eroded this benefit. - Better support for OOP? Objective-C provided things like save/load for objects. - Better support for evolutionary programming. The fact that Objective-C is dynamic and C++ is static is not an accident. Stroustrup was starting from a Simula background and trying to "sell" OOP to people who demanded "efficiency", which implies a static language. The designer of Objective-C was more concerned with long-span _maintenance_ costs and chose a design that he thought would reduce _that_: no good having a fast program if it is now far too expensive to make it do what you want. >Objective-C was a basically >"Smalltalk in C": a dynamically typed OOP language embedded inside C. >In my humble opinion, this is not a good match. Objective C _has_ changed, and there is a bit more static checkability than there used to be, but dynamicity was what the design was supposed to achieve. I imagine that _any_ level of dynamicity will be a poor match with C. Don't forget, Dylan was years in the future when ObjC was designed (:-). >To the best of my >knowledge, Objective-C lacked static checking and was much less efficient >than C++. "Much less efficient"? At what? It's possible to win all the battles and still lose the war. ObjC was designed to permit certain _kinds_ of efficiency (like code-sharing and development time) at the expense of others; C++ was designed to permit certain _kinds_ of efficiency (like run-time) at the expense of others. One could quite fairly say that ObjC dynamism doesn't encourage bloated programs the way that C++ templates do, and for the sizes of machines current when ObjC was designed, that was a major factor in over-all _system_ efficiency. (Why do I need to give a certain web browser 16Mb of memory? Amongst other things, because of OOP languages that _aren't_ dynamic. Why don't I use that browser on machine X? Because I only _have_ 16Mb on that machine, and the OS needs some of it.) Efficiency is a property of _programs_, not _languages_. I once had a Prolog program that ran faster than the Fortran program it replaced, and the Fortran compiler generated native code and the Prolog program didn't. Reason? Prolog had encouraged me to think in a way that suggested a far more efficient algorithm and made it easy for me to write that algorithm. Is there any evidence that _applications_ developed in Objective C in the NextStep environment are materially less efficient than similar applications developed in C++ for that or some other environment on the same hardware? -- Unsolicited commercial E-mail to this account is prohibited; see section 76E of the Commonwealth Crimes Act 1914 as amended by the Crimes Legislation Amendment Act No 108 of 1989. Maximum penalty: 10 years in gaol. Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.