Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is java decendent of smalltalk or c++

 
sushindranath k
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

A simple query,

Is java decendent of smalltalk or c++


Regards
sushi
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't call Java a descendant of either. Sounds pretty weird to me. I would classify Java as a enhanced version of C++.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java was designed with an eye on C++. One goal was to surprise and confuse C++ programmers as little as possible, making it easy for them to move to Java. Another goal was to leave out C++ features that surprised and confused too many people, making Java easier and less error prone for everyone.

Language or Object Oriented perfection was not a goal, and was hence missed by a wide margin. It pays the bills and amuses me, which is all I ask.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well... I usually don't argue too much with Stan, but here I'm going to make a rather different claim.

Although many people will tell you Java is a C++ descendant, it's mostly people who don't know much about Smalltalk who will tell you this. Java is an unholy marriage between Smalltalk and C++, with bits and pieces from other languages thrown in. It's like a computer-language Oreo cookie, with C++ being the chocolaty wafers, and Smalltalk being the delicious congealed trans-fat center.

Java has a type system superficially similar to C++'s; it has an object model far closer to Smalltalk's. Java has syntax closer to C++; it has semantics closer to Smalltalk. The list goes on and on.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think we disagreed. I avoided the word "descendant" cause I couldn't define what that would mean. Java's syntax was deliberately made similar to C/C++ which saddens me to this day. All OO owes a lot to Smalltalk. My exposure to Smalltalk was brief but I loved it. I wish that kind of syntax and the message sending metaphor had caught on. If nothing else it was different enough from anything else to constantly remind you that you're really doing something different. In a long career it's very tempting (and often very wrong) to make every new language do what the last one did.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic