Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!mit-eddie!barmar From: barmar@mit-eddie.UUCP (Barry Margolin) Newsgroups: net.lang Subject: Re: Object oriented (flames at end) Message-ID: <2224@mit-eddie.UUCP> Date: Fri, 22-Jun-84 02:52:25 EDT Article-I.D.: mit-eddi.2224 Posted: Fri Jun 22 02:52:25 1984 Date-Received: Sat, 23-Jun-84 02:58:47 EDT References: <289@harvard.ARPA> Reply-To: barmar@mit-eddie.UUCP (Barry Margolin) Organization: MIT, Cambridge, MA Lines: 46 In response to harvard!brownell, one of the most elegant, well-designed, and well-written operating systems I have encountered is written entirely in Lisp. I am referring, of course, to the Lisp Machines invented at MIT, and now being sold commercially by Symbolics, Inc., and Lisp Machines, Inc. (note that I work for neither of these, although I have friends working at both). The Lisp Machine supports multi-tasking, networking, and one of the best window systems in existence. The use of the Flavor type system, which was initially invented as part of the reimplementation of the Lisp Machine window system about four years ago, simplifies many of the problems in systems programming. For instance, about two years ago they implemented a condition-signalling paradigm in which conditions are flavor instances: this allows one to say that a particular type of condition is an combination of several different other types (e.g. DIVIDE-BY-ZERO has the attributes of NUMERIC-ERROR, INVALID-ARGUMENT, HARDWARE-FAULT, etc.), and condition handlers may be set up that catch either specific or general conditions (in this case, if there is no handler for DIVIDE-BY-ZERO, but there is a handler for NUMERIC-ERROR, the latter will catch a DIVIDE-BY-ZERO error). Now, before someone castigates me: I realize that it is probably possible to implement these things in any modern HLL. However, the object-oriented Lisp environment simplifies things an amazing amount. What is it about object-oriented languages that makes them so much better? It is the fact that they make it easy to mirror the real world in the programming language. This simplifies the design of programs, and also simplify the understanding of the programs. A Lisp-like language with heap-based storage and garbage-collection removes the need for the programmer to worry about bookkeeping, allowing him to work on the important parts of the program. I work mostly in PL/I, and many of the obscure bugs have to do with stupid things like attempting to free a structure twice, or freeing a structure that is referenced in another structure. In the real world you don't worry about who knows about something; if someone knows about it, that's fine, and if no one knows about it then it doesn't exist. The real world is a huge heap of atoms that can be put into relationships with each other, and the Lisp world is a huge heap of conses that can be put into relationships with each other. I hadn't intended to write such a long article, but now that I'm sort-of done, I'm glad. -- Barry Margolin ARPA: barmar@MIT-Multics UUCP: ..!genrad!mit-eddie!barmar