Re: c.d.theory glossary -- definition of "class"

From: Alfredo Novoa <alfredo_at_ncs.es>
Date: Mon, 28 Jun 2004 10:02:50 GMT
Message-ID: <40dfec0f.743839_at_news.wanadoo.es>


On Thu, 24 Jun 2004 21:42:21 +0200, mAsterdam <mAsterdam_at_vrijdag.org> wrote:

>If you look closer at anything it becomes fuzzy.

There are big differences among some terms and others.

Mathematical terms are precise. It is a good idea to use them.

For instance: to use value instead of object when object means value, to use type instead of class when class means type, etc.

IMO class is acceptable when it means "reference type".

>> I don't see any usefulness in the term having a lot more precise terms
>> like:
>
>What makes them more precise?

The mathematical rigour and the test of time.

>> type, variable, value and operator. Probably the four key terms in
>> computer language theory.
>
>I would not know. They are important allright. So are
>operand,

Contained in the notion of operator.

> expression

A sequence of operations.

>, flow

This is only about procedural languages.

>, grammar

This is about any language.

>, execution, control,
>key(word), declaration,

I don't think they are key terms.

> assignment

A particular operation.

>, token, symbol, ( and ).

keywords and tokens are symbols, all languages have symbols.

>But I did not do a count of them.
>What makes these four special?

They are very important to imperative languages (strictly functional languages are not very popular). And type, value and operator very important to all computer languages.

>> What valuable notions "class" and "behavior" have that we can not find
>> in the more precise terms?
>
>Your question is distracting.

My point is: we can avoid the use of terms like: "class", "object", "behavior", "method", "message to an object", etc. without any lose.

>I take it you mean type, variable, value and operator.
>
>Type, variable, value all have static connotations.

Type and value have static connotations, like class when it means type, but variables are dynamic. A variable is a placeholder for values, the value holded in a variable may change with the time.

>operator in combination with variable introduces some
>dynamics. In short you lose the essence of OO.

Non sequitur.

What is the essence of OO?

In the opinion of some authors the essence of OO is that in some circumstances the compiler creates jump tables for us: the "virtual method table".

>I would not like to see them replaced by
>even more people who can't describe what
>they see for lack of words.

We can describe all about OO with the classic CS terms.

>I first read about 'actor languages' in the late seventies
>in a magazine called Creative computing. These later
>came to fame as 'object oriented'. This amounted to a
>(little) degradation of the dynamic aspects - actors
>are active by definition, object may be passive.

I only see a degradation in the use of the language :)

>'type' as used in "Compilers. Principles, techniques,
>and tools by Aho, Sethi and Ullman, is a
>property of an operand (so passive to the operator).

Types are more than that and operators are associated to types.

>In the terms I see a chain from active to passive.
>Actor - object (class) - type.
>
>term : applies to : context : characterised by :
>-------|---------------|----------|------------------|
>type : operand : static : a set of values
>class : communicator : dynamic : behavior

This is clearly wrong

Type applies to operand throught the associated operators, exactly like class.

I never heard about communicators.

Classes are sets of values it that context.

It is completely obvious that that context a class is as static as any type and it is also a set of values and a set of associated operators (methods).

Methods and operations are the same and imply behavior.

You are trying to prove that two sets are distinct comparing different subsets.

A = { 1, 2, 3}
B = { 1, 2, 3}

{1} in A
{2, 3} in B

{1} <> {2, 3}

Thus A <> B

The mistake is evident.

>The dynamic/static connotation is valuable IMO.

But there are not differences between types and classes in that context.

>> When class means type it means type and nothing more.
>
>Indeed. Not very useful, and not how the terms are used.

Type is the most common use for class.

>> We don't need any extension. Types have operators.
>
>And so many people agree with you on that.
>What is your problem if types don't *have* but
>are *subjected-to* operators?

Types are associated to operators. No problem.

Regards
  Alfredo Received on Mon Jun 28 2004 - 12:02:50 CEST

Original text of this message