Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!sri-unix!hplabs!cae780!tektronix!uw-beaver!fluke!kurt From: kurt@fluke.UUCP Newsgroups: comp.lang.misc Subject: OOPS Message-ID: <364@oracle.tc.fluke.COM> Date: Thu, 29-Jan-87 22:26:35 EST Article-I.D.: oracle.364 Posted: Thu Jan 29 22:26:35 1987 Date-Received: Sat, 31-Jan-87 06:34:12 EST Distribution: comp.lang.misc Organization: John Fluke Mfg. Co., Inc., Everett, WA Lines: 26 One of the touted advantages of Smalltalk when it is called object oriented is dynamic binding. Specifically you can send a "foo" message to any class. The designer of the system insures that all relevant objects provide a method to "foo" themselves. Naturally, if an object doesn't know how to "foo" itself, you get a message not understood error. So here's the question...What has dynamic binding bought you? Don't you have to know pretty much what object you are sending "foo" messages to? Don't you have to inspect something in the object or remember when you created an object what type it is so you know it can receive a "foo"? Ignore the boring case where ALL your objects know how to "foo". You might just as well have used a language with early binding and inheritance (CLU, Simula, ...) Also, I have repeatedly heard the claim that dynamically bound languages are "just as fast" as static languages. OK, make me a believer. Who says so? I read a paper by a guy who said LISP could be optimized to a C-like level. In fact, he has a compiler that eliminates tail-recursion. And guess what. His Lisp solves Ackerman's function about as fast as PCC. Strangely enough, PCC doesn't eliminate tail recursion. Big Deal. I would like to learn of those papers that perport to show that late-bound languages can be made to compete with languages which do static binding when they can. Finally, I should say that I consider languages like CLU, Simula, HOPE, etc to be a major improvement on C. Inheritance and information hiding are a necessary part of any state-of-the-art language. I don't think the votes are all in on late binding yet though.