Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!newsfeed.internetmci.com!in2.uu.net!nb.rockwell.com!news
From: "Laird C. Williams" <williams@switch.rockwell.com>
Subject: Re: Why Java and not Smalltalk
Content-Type: text/plain; charset=us-ascii
Message-ID: <30D8E237.462@switch.rockwell.com>
Sender: news@nb.rockwell.com
Content-Transfer-Encoding: 7bit
Organization: Rockwell International, Switching Systems Division
References: <9511148189.AA818961304@ksc.ksccary.com> <4aq2lu$p6h@news.jf.intel.com>
Mime-Version: 1.0
Date: Thu, 21 Dec 1995 04:27:35 GMT
X-Mailer: Mozilla 2.0b3 (Win95; I)
Lines: 27

Patrick D. Logan wrote:

> Although there are some limitations. For example, an Array in Java
> cannot be "an array of objects all conforming to some interface".
> An array in Java is an array of one of the primitive types or of
> a *class*.

Really? That seems like a big hole...pretty much in direct violation of
having interfaces be types. I know that, in Java, if you have an interface
called "gerk", you can declare a variable of type "gerk". You're saying
that you can't declare an array of "gerks"?

> 
> On the other hand, someone could define a collection hierarchy that
> uses interfaces. (I think.) But that also leads to ugliness (I think).

Yeah...it would be ugly. Interfaces need to be first-class types in the
sense that they can be used anywhere a class can be used. The simplistic
view of interfaces is that ONLY interfaces are types, interfaces can
include other interfaces, and a class ALWAYS implements at least one interface
whose name is the same as the class's name. So... when you are using a class
name as a type specifier, the system uses the corresponding interface as the
type.

Time to dive into the spec and check this out.

TTFN   -Laird
