Java vs. C++

H

HalcyonWild

Wibble said:
Pats right. The more you know, the more they pay you.

More importantly, you never know when some killer language is
developed; your programming language becomes obsolete, and you find
yourself outdated. So if you know more than one language, you are
"safe" in this industry. Study one language in depth, and have moderate
knowledge of other languages/technologies.
 
H

HalcyonWild

Pat, I have no intention on sticking with one language, however for all
practical purposes, when selecting classes in this program I must choose
a programming language. That is the purpose of my inquiry, to make an
educated decision for next semesters course selection.


In that case, better go for C++ and then you will find that reading
about java makes it easy to understand stuff. So its C++ for your
classes, which gives you a good computing foundation. Later when you
read Java beginner books, you will find them much easy.
 
?

.


Hello Hakim.
My name is Hakim Singhji and I am currently a student at New York
University. I am majoring in Information Systems concentrating on
Application Development. However, I have not completely decided on
which application langauage to concentrate on (yet!). I am fluent in
Unix shell scripting with ksh, bash and tcsh; I know a little Perl; I
also am very fond of SQL and Oracle's PL/SQL however I am looking to
focus my studies on either C++ or Java and I am looking for a little
bit of advice in this area.

Perl is similar to procedural languages such as C. Knowing Perl and tcsh
scripting will lend itself to learning C. Languages like Python or Jython
would have taught you object oriented concepts like C++ or Java.
It appears that Java is easy to learn and it's popularity is steadily
increasing because of its speed and ease of use. However, C and C++ are
industry standards which will undoubtedly be used for a long time.

Quite true. C have been around for a long time. You have to look at where
C is being used and decide if it is where you want to be. For example, if
I want to program Digital Signal Processors (DSPs) or embedded devices
then I might want to learn C language (others will argue you want to use
Ada but we won't go there). But knowing *A* language is not all you will
need to be successful in a job. For DSPs you will need to understand many
other things including a bit of hardware and assembly language. Here you
are moving further and further from the world of C++ and Java.

C++ has been around for a long time but again, what is being programmed in
it? Is this the field you want to enter?

Finally, these languages have been around a long time but so have the
programmers who support them. Can you compete in this arena? Learning C
has a steep learning curve. Are you willing to sturggle for years until
you become as good as the guys who have been doing it for 20 years?

On a different note, some will point out that C have been around for
something like 27 years. It cannot last much longer... talk to the COBOL
programmers. They have been around even longer and people were saying the
same thing about them.
I asked one of my Unix professors this same question and he suggested
starting with C then C++. He made a comparison between C and Java using
an analogy of German and Yiddish as he explained, "Learning C is like
learning German if you know German than you know Yiddish (i.e., Java)
by default."

I think you mean, "If you know C then you know C++." There is little or no
comparison between C and Java. Additionally, the majority of things you
learn in C are very different from C++. A C programmer can use a C++
compiler to write programs but this does not mean they are C++
programmers. Anyone that claims this is not teaching you C++. Learning C++
should be very different from learning C. A good C++ programmer will use
very little from the C support that exists.
His explanation makes sense however, he is also a C++ Professor and has
written books on C and C++. So I think there may be a bias. Is this the
general feeling of Java as it relates to C and C++ among developers?

Every language has its benefits. Sometimes it is on the limits or lack of
limits imposed by the language. Other things would include the libraries
included with the language, the extra libraries that exist within the
community, the tools available for development, etc.

What you really should be deciding is what do you want to do and then pick
the language that best serves you. Some examples (assuming you only have
the three languages to choice from):

* Embedded Systems - C
* Web Applications - Java
* Desktop Applications - C++

If you are just looking at your first programming language, pick whatever.
A good school should teach you have to learn. I'm not sure if you are
familar with the saying:

"Give a man a fish and he is fed for the day.
Teach a man to fish and he is fed for life."

A good school will teach you how to program. The language they choose is
just for them to have you prove you can program. It is not about the
language but the skills to use that language.
 
?

.

I would probably agree with your professor that if you have a good
understanding of C++, then Java should come easy. You can kind of see
this 2 ways though. Do you want to start off hard, and make the second
one feel easy. Or do you want to ease into programing and then move to
the harder one when you have a good understanding of Java. Personally
I feel it is better to get an understanding in the easier language and
then work up. Not to say that C++ is incredibly hard, but it has more
things that will get you in trouble, and if you don't have a good
understanding of programming at all, this will be magnified.
Personally I would start with Java and then work to C++.

Definitely different from what I would recommend. I would recommend
learning assembly language. Makes understanding what goes on underneath C,
C++ and Java easier to understand. Mind you, I'm the sort of guy who
understands medical terminology because I asked indepth questions of my
doctor. I understand how a car works and can even rebuild an engine.

I like to look at the specs for the JVM and think about how it would be
implemented.

If you are this type of person, you want to start with C or C++ then move
to Java.
 
?

.

(e-mail address removed) wrote:

My appologies for any misunderstandings. I was not able to come to a
strong conclusion from this discussion. I think I may have posed the
question somewhat ambiguously. I hope this clears up any ambiguity: I
wanted to know if my unix background and/or SQL, PL/SQL and an interests
in unix, oracle and system administration would work best with Java or C++.

I am an undergrad student at NYU. The program requires that I
concentrate on an application language either C, C++ or Java. That is
all that is offered in this program. I want to know which language is
best to start with given my interests (unix and oracle); my skill (shell
scripting, SQL and PL/SQL) and current developments of programming
languages.

Now that you have stated the purpose of the language this is a no brainer.

My personal opinion (and others WILL disagree) is that you should learn C.
As a system administrator you might need to program device drivers, change
the OS kernel or write small applications. For small projects like these C
language is going to be best. You don't need the features that aid
organization found in C++ or Java. You do need to have access to hardware;
you will not have the low level control using something like Java. C
language is also good if you are doing batch processing or things that
require simple or no user interactions.

Bottom line, C is usually the choice of system administrators. If you are
sharing code you'll have a better chance finding what you need in C. If
you need to hit the hardware you need C or C++. The overhead of C++ makes
C a better choice.
 
?

.

I think what Pat and Wibble are trying to say is, the more languages you
know the more valuable you are. Case in point, if you wanted my last job
you'd need to know some form of assembly language, C, C++ and have
knowledge of using hardware (JTAG, prototype boards, oscilliscopes, etc.).
The job paid quite well (I made more money than some managers).

Mind you, I also know how to program in Java but the company could care
less. Sometimes knowing many languages isn't enough, if you don't know the
right languages.
More importantly, you never know when some killer language is
developed; your programming language becomes obsolete, and you find
yourself outdated. So if you know more than one language, you are
"safe" in this industry. Study one language in depth, and have moderate
knowledge of other languages/technologies.

Your logic is flawed. I agree that knowing more earns you more money. I do
not agree that it is in case your language becomes obsolete. Programming
languages don't become obsolete because some better programming language
was created.

First, if you know two or three languages of the month you are not much
safer than knowing just one such language. The safety comes from knowing
languages that have longevity.

If you learned TrueBasic, Turing and Object Oriented Turing you'd be
unemployed today. All three languages are dead. You might find some school
with no budget to change still using these languages. So you might be able
to get a job teaching Computer Science using these languages.

If in 1980 you learned C language you would be successfully employed
today. If you learned C++ in 1990 you would be successfully employed
today. If you want to play it safe, pick a language with an established
code base that shows no sign of changing.

If I have a mainframe programmed in COBOL I could convert the millions of
lines of code to Java on an Enterprise Server. It would cost a lot of
money to do this and the benefit would be small. As long as I can find
COBOL programmers it is cheaper to keep the mainframe running and hire a
few COBOL programmers to maintain it.

So, there is a huge base of C, C++ and Java code out there. People will
need programmers to maintain the code. Pick any one of these languages and
you should be safe.

Second, a language becomes obsolete because 1) no one likes it or it does
not solve a problem any better than existing languages or 2) the company
decides to drop it because they have a newer better language.

If the language does not add any value the only programmers who are going
to use it are enthusiasts. No company is going to invest thousands (or
millions) of dollars to train their programmers on a new language just
because it looks neat.

Option 2 is that the company drops it. Occasionally, a company will find
it is harder to support a language then it is worth. They will then drop
the language. This is rare though. A company has to have some good
marketing to stay in business after this. If they don't have a good
marketing strategy then most people would never buy language number 2 from
them.
 

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

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,278
Latest member
BuzzDefenderpro

Latest Threads

Top