Live data from Hacker News

Java Was Strongly Influenced by Objective-C

cs.gmu.edu

21–30 of 53 posts

Re: Java Was Strongly Influenced by Objective-C

#21
Most languages are influenced by languages they proceed.

Simula, C++, C#, and Java are clearly method calling languages. Smalltalk and Objective-C are clearly message passing languages. That is the biggest distinction.

You will always be able to find a particular feature in a particular language that is influenced by languages that have preceded it.

Re: Java Was Strongly Influenced by Objective-C

#22

Earlier quoted context omitted.

It's not really that hard, is it? You just have to implement methodSignatureForSelector and forwardInvocation. Compare to Java where it's not even possible to forward messages determined at runtime, you have to generate stubs before compiling. AFAIK.

Sure you can ... object.sendMessage(messageName) ;) Or for already built classes ... see java.lang.reflect.Method Personally if I were to choose, I'd trade some syntactic sugar for a decent garbage-collector. But that's just me :)

Message forwarding is not syntactic sugar!

Re: Java Was Strongly Influenced by Objective-C

#23
post #18
post #16

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 influence…

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?

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?

Re: Java Was Strongly Influenced by Objective-C

#24
Interview from http://www.gotw.ca/publications/c_family_interview.htm

(I'm including Stoustrup, since C++ was probably one of the influences of the choice of syntax familiy)

Q: What languages, or features of languages, inspired you?

Stroustrup: In addition to Simula67, my favorite language at the time was Algol68. I think that "Algol68 with Classes" would have been a better language than "C with Classes." However, it would have been stillborn.

Gosling: They're all over the map. Using Lisp, the thing that influenced me the most was the incredible difference garbage collection made. Using Simula and being a local maintainer of the Simula compiler was really what introduced me to objects and got me thinking about objects. Using languages like Pascal got me really thinking about modeling. Languages like Modula-3 really pushed things like exception mechanisms. I've used a lot of languages, and a lot of them have been influential. You can go through everything in Java and say, "this came from there, and this came from there."

Re: Java Was Strongly Influenced by Objective-C

#25
post #16

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 influence…

> 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?

Re: Java Was Strongly Influenced by Objective-C

#26
post #23
post #18

Earlier quoted context omitted.

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?

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 cl…

They cited Obj-C, not Smalltalk. Specific people and specific aspects of the design are mentioned, you haven't actually described how it isn't influenced by Obj-C. Which, incidentally, has primitive types, the plain C part can do static type-checking, etc. In any event the claim is the design is influenced by Obj-C not that it is actually just like Obj-C, a distinction you seem to have trouble making.

Re: Java Was Strongly Influenced by Objective-C

#27
post #16

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 influence…

> 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?

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.

Re: Java Was Strongly Influenced by Objective-C

#28
post #26
post #23

Earlier quoted context omitted.

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 cl…

They cited Obj-C, not Smalltalk. Specific people and specific aspects of the design are mentioned, you haven't actually described how it isn't influenced by Obj-C. Which, incidentally, has primitive types, the plain C part can do static type-checking, etc. In any event the claim is the design is influenced by Obj-C not that it is actually just like Obj-C, a distinction you seem to have trouble making.

"They cited Obj-C, not Smalltalk."

The author also cites Goslings "lots of experience" with Smalltalk.

"In any event the claim is the design is influenced by Obj-C not that it is actually just like Obj-C, a distinction you seem to have trouble making."

The influence is not sufficient to justify that claim any more than Java's garbage collection would justify its designers in describing Java as "Lispy" or "Lisp-like."

Re: Java Was Strongly Influenced by Objective-C

#29
post #16

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 influence…

>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?

Re: Java Was Strongly Influenced by Objective-C

#30
post #16

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 influence…

>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?

See my post below.
Post reply on HN