Hacker News new | past | comments | ask | show | jobs | submit login

Maybe because Java is more of a direct descendant of C++ than pure C (though obviously C++ is an iteration of C).

Or maybe they omitted it before there are literally hundreds of languages that were inspired from C and listing them all would have been boring for the reader.




Java has a C++ syntax to sell it to the C++ devs at the time, however its major influence was Objective-C.

https://cs.gmu.edu/~sean/stuff/java-objc.html


Or so somebody said in an interview or thought they did, but otherwise Java is nothing like Objective C with respect to messages (and of course, wrt to syntax, but that's not that important).


If you want to do dynamic dispatch, there are ways to achieve it via reflection and dynamic proxies.

Interfaces, dynamic code loading, JAr bundles, lightweight class type reflection, all trace back to Objective-C, or Smalltalk, if one wants to be pendantic.

In case you missed it, even JEE started as an Objective-C framework for the Spring distributed OS, Distributed Objects Everywhere.

https://en.m.wikipedia.org/wiki/Distributed_Objects_Everywhe...


That's my posting that was linked to.

Of course, Java doesn't have dispatch. And it's also true that Gosling's team originally considered, then rejected, C++ in favor of building Oak. But Oak borrowed an awful lot directly from Obj-C, and only later underwent a lot of syntactical surgery (turning into Java) in order to "look" like C++ specifically to attract C++ programmers, even though it didn't feel like C++ at all. This is pretty well documented.


Yet it didn't have any of the dynamic nature of Objective-C which made the attempt to replace Objective-C in OS X with Java a failure.


What?

There was no attempt to replace Objective-C with Java on OS X.

Apple was unsure if the strange look from Objective-C would ever appeal to the Object Pascal/C++ communities of Apple developers, thus they used Java wave as plan B, in case Objective-C was rejected by them.

As this did not happen, there was no reason to keep plan B around.


There was no attempt to replace Objective-C with Java on OS X.

I would say there was a heck of an attempt with the Java-Cocoa bridge that didn't do well because Java didn't have a lot of the dynamic nature of Objective-C. They certainly to my eyes as a developer tried to push Java.


As you wish, Java-Cocoa bridge could have never replaced Objective-C, when writing Objective-C was still part of the game to actually use it.

Do you actually believe that Jobs liked Java, when Apple was created on top of Object Pascal and C++, and then he was responsible for bringing Brad Cox to NeXT?


Yeah, given the crap they were sending in the monthly discs to developers at the time. They certainly seemed like we should of took Java seriously. I was rather annoyed given I had learned Objective-C on NeXTSTEP. I'm glad that someone realized it was not substitute, but they did push it. Jobs hated it later, but he changed his mind on things fairly often given just looking at iPod features.


How could Java be a substitute when Cocoa bridge only allowed for a subset of OS X frameworks to be called from it?

Java was already available on System 7.


Well, it sure didn't, but the messaging in those CD-ROMs was pretty obvious and I suppose they would have expanded it if someone didn't realize it was a lost cause. I didn't develop for Macs until Apple bought NeXT, so I don't know what was available for System 7.


Sometimes one understands what they think they want to understand.

Java was definitely not on the picture when Apple went to CERN doing their OS X marketing sessions.

In fact, you now made me dig out some stuff.

https://developer.apple.com/library/archive/documentation/Ja...

https://developer.apple.com/library/archive/documentation/Co...

> This document discusses issues that arise when writing Java applications with Cocoa, which is implemented in Objective-C.

No Java here on the OS X announcement:

https://youtu.be/SjlLG1EzJ2k?t=4450

The only message was Java being first party on OS X, as in the System 7 days, the JVM was not from Apple rather a third party. Thus the announcement at JavaONE 2000.

https://www.javacoffeebreak.com/articles/javaone00/index.htm...

You will not find in those CDs anything like this:

> Swift is a successor to both the C and Objective-C languages. It includes low-level primitives such as types, flow control, and operators. It also provides object-oriented features such as classes, protocols, and generics, giving Cocoa and Cocoa Touch developers the performance and power they demand.

https://developer.apple.com/swift/


Why would you think Java is a descendant of C++? There may be overlap in some syntax, mainly from C. C++ is not, and was not, the only OOP language, and I have heard no such that that is should be descendant of C++.


I was once at a talk given by James Gosling. He said that Java-the-language was «a trick to get C++ programmers to use the Java Virtual Machine». He deliberately made Java very similar to C++ but removed what he saw as the hard and risky parts (memory management, operator overloading, etc) that are typically not required for standard applications.

Well, that was my interpretation of what he said, errors are my own etc. But this would make Java a direct descendant of C++, in my mind.


I have never heard that quote from James before. Are you sure about the JVM? The JVM was quite controversial back then, Java first had to prove that you could make a performant virtual machine.

But Guy Steele claimed "We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp."


Well, it’s many years ago and memory corruption is real. I got the impression that their goal was to get adoption of (what at some point became) the JVM, or the «compile once run anywhere» vision. They envisioned many languages to coexist on the JVM, which kinda happened but maybe not as much as they thought. So they designed a language to get started, Java, and made it familiar-looking to get people om board.


I was around at the time.

Java's object semantics are explicitly intended as a streamlining of C++, the keywords are the same for the most part, and it was sold as a C++ which runs anywhere with no memory leaks.

Note that I mentioned the semantics: the object semantics of Java and C++ are so similar as to have corrupted the entire concept of objects in their favor.

This wasn't an accident, and it wasn't malice, it just feels like it sometimes.


I'm not a Java programmer but as far as I can tell java object semantics, far from being corrupted, do indeed come from simula via c++.

Thanks to reflection and a featureful VM, Java does have a significant amount of dynamic behaviour that can be used to implement a lot of features of the smalltalk side of the OO family tree.


Because at the time it was pretty clear.

'At that stage, C and C++ "absolutely owned the universe"' - https://www.zdnet.com/article/programming-languages-java-fou...

They took a lot of inspiration from C/C++'s syntax and seemed to be pretty concerned with improving memory management, security and developer velocity.


Another programming language being popular by no means mean that it is a derived language of any sort. Any development is of course retrospective, but it is sorta like saying all music is descendant from pop.


I understand the point you’re trying to make but writing music is a creative process whereas marketing programming languages isn’t.

I was around at the time and C++ was trendy so Sun were marketing it as the future for C++ developers. It was definitely influenced by what was in vogue at the time even if it doesn’t adopt all of the traits of C++.

I remember this because I wasn’t a fan of C++ back then as I’d come from the ALGOL family of languages so found C-style syntax a little alien (and tbh I still don’t like C++ now even though I’ve since warmed to C’s syntax) so it took me years before I warmed to Java.


Define "derived".

In particular, if Java kept (almost?) all the keywords, and the operators, and the statement terminators, and the block delimiters, and the same approach to object-oriented... how is it not derived from C++?


>C++ is not, and was not, the only OOP language

No, but it was the only one that mattered at the time, as far as adoption was concerned, and regarding marketing Java as similar to existing programmers and their managers...

That's also how it was hyped at the time and the kind of people it was sold too (I was -barely- there).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: