Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.object Subject: Re: The Emperor Strikes Back Message-ID: Date: 25 Feb 91 20:34:12 GMT References: <3351@sequent.cs.qmw.ac.uk> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 68 Nntp-Posting-Host: odin In-reply-to: steve@cs.qmw.ac.uk's message of 15 Feb 91 20:50:37 GMT On 15 Feb 91 20:50:37 GMT, steve@cs.qmw.ac.uk (Steve Cook) said: steve> A while ago, there was an article by Scott Guthery in Dr Dobbs steve> Journal called "Are The Emperor's New Clothes Object-Oriented?" steve> [ ... the author ... ] If you didn't know better, you might think steve> he knows what he's talking about. The trouble is, he mostly steve> doesn't. No, his points mostly have merit, if you concede that he is apparently discussing OO programming in its historical manifestations, not in its conceptual basis. Many of his points are about serious historical problems that await solution or whose solution is only very recent. Still his overall conclusion is wrong; OO programming technology is not a silver bullet, and there are problems, but it is arguably, with all its defects, better than many alternatives. The claim is not that OO technology is perfect, which is he seems to use as a pointless straw man, but that it is less imperfect than others because it has one important conceptual advantage. It is thus especially unfortunate that your rebuttal of his article is marred by one particular colossal misconception: steve> What is an object? steve> According to Guthery, 'stripped of its fancy jargon, an object is steve> a lexically-scoped subroutine with multiple entry points and steve> persistent state'. [ ... ] steve> But the most fundamental idea of object-oriented programming is steve> dynamic binding of operation names to operations at run-time. Dynamic overloading has nothing to do with objects or OO programming; not all languages that have dynamic overloading/latent types are OO and not all OO languages have dynamic overloading/latent types. steve> Lexical scoping has nothing whatever to do with objects. Conversely, lexical scoping is essential to the principal style of object implementation, the closure based one. The other one being the one based on continuations (actors) instead of lexically scoped closures. steve> Can somebody who's failed so completely to grasp the basic idea steve> be trusted to criticise the whole technology? Unfortunately he *has* grasped the basic idea of how objects are usually *implemented* (as lexically scoped closures with multiple entry points), and you haven't. But Mr. Guthery has missed the main point. He is wrong in dismissing objects as being 'just' lexical closures, because lexical closures are very powerful technology indeed, and in particular they are an eminently appropriate implementation for the basic idea behind OO programming. The basic idea of OO programming is that its decomposition paradigm by type instead of by function results in less tightly coupled and thus more reusable modules (which may be *implemented* as closure or continuation generators) than other decomposition paradigms, at least in a majority of cases. It is this idea that the Mr. Guthery does not really discuss, and this makes his article largely irrelevant to an argument on the merits of OO programming instead of those of some of its past manifestations. -- Piercarlo Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk Brought to you by Super Global Mega Corp .com