[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Inheritance

  • From: "Mark L. Fussell" <fussellm@a...>
  • To: xml-dev@i...
  • Date: Sat, 22 Nov 1997 02:37:31 -0800 (PST)

subtype vs subclass

Paul, 

No argument with your posting (I decided not to post a similar statement 
after rereading yours), but could you change your terms slightly?  
Although the OO terms themselves were definitely conflated during the 
eighties they have by now settled down to:

    Type:  The declaration of the interface of any set of [objects] that 
conforms to this common protocol. Any set of objects or values 
with similar behavior... [Firesmith+E 95] 

    Class:  A class is the realization of a type. [UML]  The idea of 
class is closely linked...with the description of implementation details 
of software objects [Cook+D 94].

    Type vs. Class: Types classify objects according to a common 
interface; classes classify objects according to a common implementation. 
[Firesmith+E 95] 

    Subtyping: The incremental definition of a new type in terms of one 
or more existing types, whereby the subtype conforms to all of its 
supertypes [an is-kind-of relationship] [Firesmith+E 95]

And subclassing implies implementation-inheritance (i.e. code reuse), 
exactly what you were trying to avoid implying.

So I would suggest rewriting your example to:

> > Anyhow, you can emulate OTHER using subtyping without an explicit 
> > OTHER construct.
> > 
> > <!ELEMENT CITATION (name, author, date, OTHER-CIT* )>
> > <!ELEMTYPE OTHER-CIT> <!-- no constraints on subtypes -->
> > <!ELEMTYPE ANOTHER-TYPE ISA ANY>  <!-- Be explicit about the 
automatic root -->
> > 
> > <!ELEMENT URL (#PCDATA) ISA (OTHER-CIT & ANOTHER-TYPE)>

Which makes it use the standard terminology. 

So, ELEMENTs would be the leaves of a tree/digraph of Types with ANY as
the root.  Note that ISA should formally be IS-A-KIND-OF but that is an
annoyingly long keyword.  (My dog is-a Dog which is-a-kind-of Mammal vs:
My dog is-a Dog which is-a Mammal). 

--Mark
mark.fussell@c...

  i   ChiMu Corporation      Architectures for Information
 h M   info@c...         Object-Oriented Information Systems
C   u    www.chimu.com         Architecture, Frameworks, and Mentoring



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.