Path: utzoo!utgpu!watmath!clyde!mcdchg!chinet!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!portal!cup.portal.com!dan-hankins From: dan-hankins@cup.portal.com (Daniel B Hankins) Newsgroups: comp.lang.misc Subject: object oriented design decisions Message-ID: <10610@cup.portal.com> Date: 29 Oct 88 01:34:50 GMT Organization: The Portal System (TM) Lines: 47 In the process of designing an object oriented language, I have come up against two issues. I have some idea of what to do with them, but would like to hear other opinions on the topic. 1. Should I have lexical scoping for classes? That is, should I allow: class X; . . . class Y; . . . endclass Y; endclass X; where Y is a class name known only within class X. Y knows the names of: * its scope-children classes * its scope-sibling classes * its scope-ancestor classes Note that this is not an inheritance relation, only a class name relation. The purpose of this is to allow situations in which class DRINK and class TOOL each have a subclass SCREWDRIVER, and each subclass has different behavior. It also allows class X to have superclass Y. This can actually be useful on occasion. 2. fine-grained inheritance control. for instance: class X; superclasses A, B, C; from L inherit K; . . . where K is a message pattern understood by L or the name of some local datum of L. If K is a pattern name, then both the handler and any local data it uses are inherited. Any comments? Dan Hankins