Newsgroups: comp.object,comp.lang.smalltalk,comp.lang.c++,comp.lang.misc
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.kei.com!newsfeed.internetmci.com!in2.uu.net!mdisea!mothost!schbbs!news
From: shang@corp.mot.com (David L. Shang)
Subject: Re: Types, types: static vs. dynamic -- classification
Reply-To: shang@corp.mot.com
Organization: MOTOROLA 
Date: Wed, 29 Nov 1995 17:30:33 GMT
Message-ID: <1995Nov29.173033.5835@schbbs.mot.com>
References: <yf37n0kmiwr.fsf@sabi.demon.co.uk>
Sender: news@schbbs.mot.com (SCHBBS News Account)
Nntp-Posting-Host: 129.188.128.126
Lines: 83
Xref: glinda.oz.cs.cmu.edu comp.object:41616 comp.lang.smalltalk:31250 comp.lang.c++:162471 comp.lang.misc:24022

In article <yf37n0kmiwr.fsf@sabi.demon.co.uk> piercarl@sabi.demon.co.uk  
(Piercarlo Grandi) writes:
> >>> On Tue, 28 Nov 1995 15:30:28 GMT, shang@corp.mot.com (David L. Shang)  
said:
> 
> David> Functionality or behaviour, though abstracted in type, it should
> David> belongs to object, not to type.
> 
> No, no, you are still missing the point: it cannot belong to a type
> either, because it is a concept, and concepts cannot be part of _any_
> entity that is part of a computer language.

I said that it cannot not belong to type. What you are trying to say?

A concept must be embodied so that you can describe it to a computer
in a computer language. Once a concept is embodied, why it cannot be
an entity of a computer language?

When class is a firts-class object, why it cannot be a entity?

In many languages, functions can be passed in value, why it cannot be
an entity?

> 
> David> Let T be the type, X be the object, and F be the behavior, we use
> David> X.F to get F, not T.F. Therefore, F is not a state of T, but a
> David> state of X.
> 
> Perhaps you should reconsider -- it looks as if you are bing fooled by
> mere syntax -- for whether I write 'x.f()' or 'f(x)', and some languages
> allow you do write either form indifferently, what matters is whether
> the connection between 'x' and 'f()' is direct or 'mediated' by a
> class/type. One case is when it is direct, and each object has
> potentially its own unique set of procedures; but in almost all OO
> languages it is indirect, in that objects don't have any set of
> procedure, they are clustered in classes.

I do not care whether the connection is direct or indirect.
All I want to know is that from whom I get "f", even the "f"
is shared by many objects and mediated by a type or a super
type. The location of "f" or how "f" is shared or how it
is inherited are implementation issues. In concept, we cannot
say that "f" belongs to a type.

> David> This way, we unified the concept of nested classes and member
> David> functions.
> 
> I think that you will find that the two concepts were already "unified"
> in Simula 67. A class is nothing but a freely instantiable
> function. "Structured Programming", part 3, (Academic Press).
> 

They are also unified in Beta (pattern) and Cluster. But a different
way: a function is nothing but a class. The unification is not new.
But no other languages gets the real benefit of the unification: 

> David> The class concept is generalized; so that we can build up various
> David> models such as mutithread task, distributed server with remote
> David> services, database with transations, etc. Transframe has this
> David> unification and the nested level is unlimited.
> 

> 
> David> I don't like the idea to treat "tags" as a part of the object.
> David> Tags are bound to polymorphic variables only, not to objects.
> 
> I am fairly sure that in many OO and non OO languages objects are
> tagged, either at compiletime, or at runtime, to support strong typing.
> 
> David> C++ uses a tag as a part of the object.
> 
> Like all strongly typed languages, I would add, but so far so good.
> 
> David> As a result, C++ cannot separate the tags from object codes. That
> David> is why C++ cannot provide a complete type info for all types.
> 
> More incomprehensible mumbo-jumbo. Oh well, somebody must have spiked my
> coke tonight.

See my previous post.

David Shang

