my dog learned polymorphism
The moose likes Meaningless Drivel and the fly likes Apply your Lateral Thinking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "Apply your Lateral Thinking" Watch "Apply your Lateral Thinking" New topic

Apply your Lateral Thinking

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3640
What does following statement mean?

Java = C++--

My blood is tested +ve for Java.
Sameer Jamal
Ranch Hand

Joined: Feb 16, 2001
Posts: 1870
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11957

my understanding is this..

Both java and c++ take a lot from the C language. c++ got it's name becuase it's like C, but with more... so it's c PLUS stuff... hence c++. c++ has a bunch of stuff like destructors and multiple inheritance that java does not. but java still has more than c. if you take stuff out of c++, you get java. so, it become (c++)--

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Originally posted by Chetan Parekh:
What does following statement mean?

Java = C++--

Java has C plus some more stuff so ++
And at the same time Java doesn't have some stuff of C so --

So it becomes Java = C++--

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
C++ was misnamed in the first place. From the WikiPedia ...

The Combined Programming Language (CPL) was a computer programming language developed jointly between the Mathematical Laboratory at the University of Cambridge and the University of London Computer Unit during the 1960s.

BCPL (Basic Combined Programming Language) is a computer programming language that was designed by Martin Richards of the University of Cambridge in 1966; a response to difficulties with its predecessor CPL.

B was the name of a programming language developed at Bell Labs. It was mostly the work of Ken Thompson with contributions from Dennis Ritchie, and first appeared in 1969 or thereabouts. B was essentially the BCPL system stripped of any component that Thompson felt he could do without, in order to make it fit within the memory capacity of the minicomputers of the time.

The C programming language is a standardized imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the Unix operating system. I It was named "C" because many of its features were derived from an earlier language called "B".

Now comes the error. C was not the next letter of the alphabet after B, it was the next letter of BCPL. C++ should have been named P. (Rhymes with T, stands for Trouble.) And naturally Java should have been L.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11957


ALSO from the wikipedia article on C++:

This name is credited to Rick Mascitti (mid-1983) and was first used in December 1983. Earlier, during the research period, the developing language had been referred to as "C with Classes". The final name stems from C's "++" operator (which increments the value of a variable) and a common naming convention of using "+" to indicate an enhanced computer program, for example: "Wikipedia+". According to Stroustrup: "the name signifies the evolutionary nature of the changes from C". C+ was the name of an earlier, unrelated programming language.

Some C programmers have noted that if the statements x=3; and y=x++; are executed, then x==4 and y==3; x is incremented after its value is assigned to y. However, if the second statement is y=++x;, then y==4 and x==4. Following such reasoning, a more proper name for C++ might actually be ++C. However, c++ and ++c both increment c, and, on its own line, the form c++ is more common than ++c. However, the introduction of C++ did not change the C language itself, so an even more accurate name might be "C+1".
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Java is not C!


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Apply your Lateral Thinking
It's not a secret anymore!