Java or C++?

A

Atharvan :-)

hi,

I often saw Razii in newsgroups dealing with Java and C++.
And I like the benchmarks of C++ and Java he producing in favour of
Java.

Let me introduce myself. I am a B.Sc (Computer Science) student.
And of course I am not a professional to give advice.
But I want to suggest Razii to read the following link at least once
before posting such things.
Java and C++ and entirely different. (and Many of Java's foundation is
written using C.)
(nb: I am not against Java. I am started using C++ and now studying
Java.)

These are all links that you all may be interested. Have a look
please.
And Razii if you please create a profile I can know more about you :)

1) Is Java the language you would have designed if you didn't have to
be compatible with C?
http://www.research.att.com/~bs/bs_faq.html#Java
2) Would you compare C++ to "some language"?
http://www.research.att.com/~bs/bs_faq.html#compare
3) Others do compare their languages to C++; doesn't that annoy you?
http://www.research.att.com/~bs/bs_faq.html#Others-do-compare
4) How can a legacy language like C++ compete with modern, advanced
languages?
http://www.research.att.com/~bs/bs_faq.html#advanced
5) Why is C++ so BIG?
http://www.research.att.com/~bs/bs_faq.html#big
6)Is the number of C++ users still doubling every year?
http://www.research.att.com/~bs/bs_faq.html#number-of-C++-users
7)C++ Applications
http://www.research.att.com/~bs/applications.html
8) The Programming Languages Beacon
http://www.lextrait.com/vincent/implementations.html
9) Bjarne Stroustrup's FAQ
http://www.research.att.com/~bs/bs_faq.html

with love,
Arun.K.R

[
Atharvan!!!
{333}
GPG Key :928C3AF1
ChintaaDaara.blogspot.com
ChintaaDaara.blog.co.in
]

{MAN can be DESTROYED, but cannot be DEFEATED. }
 
D

Daniel de Kok

I've been programming Python for a couple of years now. Now I'm
looking to move on to either C++ or Java, but I'm not sure which.

Which one do you think will be a better transition for a Python
programmer? Which one will educate me the best?

Java will probably be the easiest transition, but I think C++ will
educate you better. It's a fairly complex language that gives you much
more control than Java. More control requires more responsibility.

As an additional bonus, you can optimize parts of your Python
applications where necessary by rewriting them in C++, and creating
bindings with Boost.Python.

Take care,
Daniel
 
S

Stefan Ram

Raz said:
No, but it has object of type NullPointerException.
[...] Java has pointers in the sense
that all variables point to the objects that they reference. If the
variable is pointing to null object, you get NullPointerException.

The wording of the quoted text (by Raz) is not consistent with
Java terminology in all details, but I do not want to delve
into this, as Java is not the topic of this newsgroup.

Still, I would like to express one fact about Java:
Reference values /are/ pointers by the Java language specification:

»(...) reference values (...) are pointers«

JLS3, 4.3.1.

http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.3.1
 
J

James Kanze

Well, troll, Pete Becker, of course, Java has pointers in the
sense that all variables point to the objects that they
reference.

I don't think you understand Pete's particular brand of humor.
If the variable is pointing to null object, you get
NullPointerException. That's far better than leaving the
behavior undefined like in C++.

You mean it's better to impose a wrong behavior, rather than
letting the implementation do the right thing?

I don't like the "undefined" myself, but you can't *require* a
core dump at the language level if the language is to support
machines without any disk. And on all implementations which run
under a real OS, dereferencing a null pointer will result in a
core dump (or whatever the equivalent is on that system).
 
D

darkscriptc

I've been programming Python for a couple of years now. Now I'm
looking to move on to either C++ or Java, but I'm not sure which.

Which one do you think will be a better transition for a Python
programmer? Which one will educate me the best?

This may sound like a really old guy speaking, but, What do you want
to use the knowledge for?

Learning a language is not an action you take just to LEARN it means
that you will actually use it for something. For example, if you were
good at using language X, and wanted to do a really fast game with
your own exotic algorithms, but language X is not the best at
fulfilling your objective. Then, and only then, do you really need to
go out and look for something that does the job better.

I can't tell you which one is better, because it depends on what you
want to do. However, generally if you want a high performance program
then go with C++. If you want to make something that works on many
platforms, with less coding time, use Java.

In terms of which is easier or not, C++ and Java are the same. You
have some confusions there that aren't in the other, but overall the
amount of confusions, which hopefully is low, is the same between the
two.

Regards,

Wanas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,199
Latest member
AnyaFlynn6

Latest Threads

Top