Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!husc6!rice!titan!boehm From: boehm@titan.rice.edu (Hans Boehm) Newsgroups: comp.lang.misc Subject: Re: Bondage and Discipline Languages Summary: Object orientation shouldn't be a language feature Message-ID: <2414@kalliope.rice.edu> Date: 30 Dec 88 21:47:46 GMT References: <3300001@uxg.cso.uiuc.edu> <4509@xenna.encore.com> <4533@xenna.Encore.COM> Sender: usenet@rice.edu Reply-To: boehm@titan.rice.edu (Hans Boehm) Organization: Rice University, Houston Lines: 39 I agree with most of the points made in this discussion, but Dan Pierson included one sentence that troubles me: > Also C++ still lacks exception handling which I rate about > equal to object orientation as an essential language feature. I disagree somewhat about the importance of exception handling, but that's beside the point. I'm troubled by the view that "object orientation" (or exception handling) should be a language feature. I agree that object-oriented programming is an extremely useful methodology. But casting it in stone by directly embedding one view of it into the language design seems to be precisely what the "Bondage & Discipline" languages are about (although they of course generally did it for a less modern methodology). I would certainly agree that a language should make it easy to program using an object oriented methodology. But I would be much more convinced if this happened because the language design was sufficiently general that it could express the necessary concepts rather than because someone specifically tacked on the necessary constructs. Both classes and objects are really just tuples of things. Inheritance amounts to adding elements to a tuple. If I can't express these without adding new language constructs, isn't there something wrong with my language that has little to do with object orientation? I also wouldn't have much confidence that it could survive the next minor change in methodology. Similarly, if I want exceptions, I would be happier with first-class continuations, perhaps together with a library implementing your favorite style of exception handling, than I would be with a new language primitive. Admittedly, some of this raises incompletely resolved issues in language and compiler design (which is of course one legitimate reason for the popularity of languages like C++). But there are languages that come close to achieving these things. Scheme, as well as a variety of more experimental statically typed languages come to mind. I may have read a lot into Dan Pierson's statement that he didn't think he said. If so, I apologize. Hans-J. Boehm boehm@rice.edu