Re: Object Class and Data Type

From: D Guntermann <guntermann_at_hotmail.com>
Date: Thu, 1 Apr 2004 21:14:57 GMT
Message-ID: <HvIGCy.IKo_at_news.boeing.com>


I found this quote on wikipedia.org, in reference to computer science related programming classes (versus class definition in logic).  Page history indicates that there is some doubts as to whether information included is irrefutably correct or neutral:
 
"A class also describes a set of invariants that are preserved by every method in the class. An invariant is a constraint on the state of an object that should be satisfied by every object of the class. The main purpose of the invariants is to establish what objects belong to the class. An invariant is what distinguishes datatypes and classes from each other."
 
My apologies to Dr. Pierce for attributing a degree speciousness to him personally.  Quotation attribution was misleading, a correction was not forthcoming, and my suspicion that the quote was out of context was indeed correct.
 
- Dan
 
References:  Wikipedia.Org.  Available: http://en.wikipedia.org/wiki/Class
 
"Tom Hester" <$$tom_at_metadata.com> wrote in message news:a8b99$406a148a$45033832$30830_at_msgid.meganewsservers.com...
No they are not the same.  Perhaps understanding the difference should be a prerequisite to contributing to a theory group.  "[A type system is a] tractable syntactic method for proving the absence of certain program behaviors by classifying phrases according to the kinds of values they compute."
(Types and Programming Languages, MIT Press, 2002)  "A class contains a description of  data ("state") stored in the objects of the class.  A class implements its interfaces by specifying methods that describe what operations can be performed on the data stored in the objects of the class.  A class also describes a set of invariants that are preserved by every method in the class. An invariant is a constraint on the state of an object that should be satisfied by every object of the class. The main purpose of the invariants is to establish what objects belong to the class. An invariant is what distinguishes datatypes and classes from each other. " 
 
As I said before, the purpose of a type is to highlight differences (absences of behavior)  whereas a class hierarchy is intended to highlight similarities (invariants).
"D Guntermann" <guntermann_at_hotmail.com> wrote in message news:HvEx8L.9tC_at_news.boeing.com...
>
> "Tom Hester" <$$tom_at_metadata.com> wrote in message
> href="news:d2b19$406990ec$45033832$24651_at_msgid.meganewsservers.com">news:d2b19$406990ec$45033832$24651_at_msgid.meganewsservers.com...
> > Of course you are right.  The purpose of class and type are entirely
> > different.  A class hierarchy is intended to relate entities based on
> common
> > behavior; however, a set of data types is intended to elaborate the
> > differences between sets of values.
>
> So I guess real numbers, rational numbers, and integers are not part of the
> same class hierarchy since they are data *types* versus your precious
> classes.  What kind of reasoning is this?  There are still basic properties
> of numbers shared, whether its called class or type.
>
> Isn't the set of engineer objects in some context a subset of person
> objects?  The set of values are different based on semantics and rules, but
> they are drawn from the same generalized set - the same as numbers.
>
>
> So, for example, it is common for a
> > class hierarchy to have a single root; often called object or entity.  But
> > data types rarely if ever inherit from a single  basic data type.
> > Furthermore, class itself is typically defined as an object with certain
> > behaviors.  On the other hand, one never sees data type, a base type,
> > defined as a data type!
>
> You
are getting data type and built-in data type confused.  You are also
> confusing low-level constructs with higher levels of abstraction.
>
> - Dan
> >
> >  "Laconic2" <
laconic2_at_comcast.net> wrote in message
> > news:0fudnaF9l9x-kvXdRVn-uQ_at_comcast.com...
> > > Over in the OTLT thread,  I saw where someone used the name "CLASS" to
> > > describe the code_type.  It seems to me that many people use "class" and
> > > "type"  as though they were synonyms.  It seems to me that they are not.
> > >
> > > Any thoughts?
> > >
> > >
> > >
> > >
> >
> >
>
>
Received on Thu Apr 01 2004 - 23:14:57 CEST

Original text of this message