top | item 1119097

(no title)

oopd | 16 years ago

The use of the word "influenced" to describe the effect had on Java's design process by Smalltalk, Objective-C and other languages of good repute is really somewhat misleading.

Certainly, there is some identifiable influence. For example, the concept of a JIT-ing virtual machine comes straight from Smalltalk (Deutsch & Schiffman, 1984), and it would also not surprise me if the APIs of Smalltalk and NeXTSTEP influenced the design of Java's somewhat. But that is largely where the influence ends: on the implementation of the language rather than on the language itself.

Java the language belongs on the same branch of the OO family tree with C++, C# and other strong statically-typed OO languages--not on the branch with Smalltalk and company. Yes, Java's object model is class-based, single-inheritance and single-dispatch, but its model has little else in common with Smalltalk's. If it was designed with Smalltalk in mind, then it constitutes a dangerous misunderstanding of it. I do not mean the fact that "everything" in Java is not an object, but rather that some things that very clearly should be objects, such as classes, are not objects is alone enough to disqualify it as one of Smalltalk's legitimate offspring.

The people who assert over and over again that Java was influenced by this language or that language do so because this language or that language has a better reputation among programmers than Java, and it is hoped that by doing so perhaps some of that reputation might rub-off on the hapless language.

discuss

order

pvg|16 years ago

The people who assert over and over again that Java was influenced by this language or that language do so because this language or that language has a better reputation among programmers than Java

The post was written by one of the people who worked on Java, not somebody trying to impress you by associating Java with some language you like better. Are you trying to say Patrick Naughton is just making this up?

oopd|16 years ago

As pointed out in my post, the alleged influence simply isn't there, or isn't there enough to justify the claim. Someone who cites Smalltalk as their inspiration before going off and creating a statically-typed OO language with primitive types and classes that aren't real objects either didn't understand Smalltalk or deliberately chose to distort the concepts imbued in it enough that they no longer have a right to claim it as an antecedent.

Gosling and others have been making claims of this sort for years, and yes, I do believe that they do so with the hope of improving their language's reputation, and further, to give their users the impression that they aren't missing out on anything by sticking with Java; that Gosing et al. studied the cream of the language crop when designing Java, took the good parts and left the cruft behind, so why bother trying anything else?

michaelneale|16 years ago

>very clearly should be objects, such as classes, are not objects

Well classes are objects themselves, but not necessarily related in a useful way to the objects which they instantiate. You can't do as much with them (other then look at them, or load new ones) - or do you mean more a prototype based OO?

oopd|16 years ago

See my post below.

prodigal_erik|16 years ago

> some things that very clearly should be objects, such as classes, are not objects

I don't get it. java.lang.Object.getClass() always returns an instance of java.lang.Class. What other behavior would you require before saying that Java classes are objects?

oopd|16 years ago

In Smalltalk, when you type the name of a class you are really referencing a global variable that refers to a class object. "Dictionary new" means send the message #new to Dictionary, and the Dictionary class object will respond by giving you a new instance of itself. "Dictionary compile: 'foo ^ 42' classified: #accessing" will add a method "foo" to Dictionary under the "accessing" category that will return 42 (an instance of SmallInteger). Classes in Smalltalk are living objects available for manipulation at all times. They have their own instance variables/methods, just like any other object. Java, C++ and C# treat the class as some sort of namespace into which you can place global functions/variables.