c/c++ required?

J

jesse

i'm interested in learning java because i want to move on from perl and php
and general web applications like that. i read somewhere that, to learn
java, knowing C and C++ is required.

any feedback on that?

- jesse
 
A

ak

i'm interested in learning java because i want to move on from perl and
php
and general web applications like that. i read somewhere that, to learn
java, knowing C and C++ is required.

it is really better if you _don't_ know c and c++ before you start with
java.

____________

http://reader.imagero.com the best java image reader.
 
S

Sudsy

jesse said:
i'm interested in learning java because i want to move on from perl and php
and general web applications like that. i read somewhere that, to learn
java, knowing C and C++ is required.

any feedback on that?

- jesse


I wouldn't go so far as to say REQUIRED. It can certainly help if you
know C syntax as Java is almost indistinguishable from that (within
methods, of course). And if you've got a sound basis in Object-Oriented
programming from C++ then you're more than halfway there. That's a big
IF, BTW. Estimates from companies like Forrester Research suggest that
upwards of 70% of "C++ code" is actually procedural C.
You could also just leap into learning Java and not have to worry
about baggage from previous use of C/C++. Fewer bad habits to unlearn.
Enjoy!
 
A

Andrew Thompson

| i'm interested in learning java because i want to move on from
perl and php
| and general web applications like that. i read somewhere that,
to learn
| java, knowing C and C++ is required.

No. To program C++ effectively you need to
understand OO - same with Java.

C ..C(?!) is not an OO language. I guess it
would not be very helpful in learning Java.

With either you would have to 'unlearn' bits
of the C/C++ when coming to Java, so I
see no advantage to learning them if you
ultimately only want to code Java.

OTOH, it can be very helpful to have several
languages under your belt. It helps avoid the
'this is the only language for the job' syndrome..

[ Just a few ..meandering thoughts.. ]
 
J

J

i'm interested in learning java because i want to move on from perl and php
and general web applications like that. i read somewhere that, to learn
java, knowing C and C++ is required.

any feedback on that?

- jesse

It makes it esier for C/C++ programmers to learn java since the syntax is
similar. However, you DON'T need c/c++ to understand java.

Learn java should be easy from a perl background. But things are little more
lower level than they are in perl.

J
 
S

Sudsy

Jorge said:
Why? I don't think I could agree with that.

Because people can develop bad habits using these languages. And then
they have the audacity to demand equivalent functionality in Java
instead of "unlearning what they have learned" (Yoda paraphrased).
I think that ak is right! It's better to come to the OO table with
no preconceptions. Learn Java, find out what it can do and then
learn further how to utilize it best.
Generics are arriving in 1.5? Big deal! Kowtowing to the C++ crowd
is not the way to improve the breed. If C++ was so great then why
are the practitioners migrating to Java?
I'm buttoning up my Nomex(tm) suit after that observation but I
stand behind my aluminum-silicate brick wall on this one... ;-)
 
A

Andrew Thompson

| ak wrote:
| >>i'm interested in learning java because i want to move on
from perl and
| >> php
| >
| >>and general web applications like that. i read somewhere
that, to learn
| >>java, knowing C and C++ is required.
....
| > it is really better if you _don't_ know c and c++ before you
start with
| > java.
| >
| Why?

Look in this thread at the posts of Sudsy and myself.
Keywords 'baggage' and 'unlearn'.

| I don't think I could agree with that.

Why?
 
J

Joona I Palaste

Jorge Rivera said:
Why? I don't think I could agree with that.

Having to learn C or C++ before Java is the same as having to learn
Fortran before C or C++, or having to learn Algol before Fortran, or
having to learn machine code before Algol.
 
S

Scott Ellsworth

jesse said:
i'm interested in learning java because i want to move on from perl and php
and general web applications like that. i read somewhere that, to learn
java, knowing C and C++ is required.

any feedback on that?

Not a chance. Knowing other languages always helps learn a new one, but
there is no reason to spend time learning something other than your
target.

I knew them both, but I did paying work in Basic, Pascal, and FORTRAN as
well. Knowing these others helped me learn Java just like knowing Perl
and PHP will probably help you a lot.

Scott
(e-mail address removed)
Java, Cocoa, WebObjects, and Database consulting
 
M

Manolis Christodoulou

Sudsy said:
Because people can develop bad habits using these languages. And then
they have the audacity to demand equivalent functionality in Java
instead of "unlearning what they have learned" (Yoda paraphrased).
I think that ak is right! It's better to come to the OO table with
no preconceptions. Learn Java, find out what it can do and then
learn further how to utilize it best.
Generics are arriving in 1.5? Big deal! Kowtowing to the C++ crowd
is not the way to improve the breed. If C++ was so great then why
are the practitioners migrating to Java?
I'm buttoning up my Nomex(tm) suit after that observation but I
stand behind my aluminum-silicate brick wall on this one... ;-)

I have to agree with you. I learned c/c++ first, and I had hard time to
understand java in the first place. Now it is the oposite!
 
T

Tim Ward

Scott Ellsworth said:
Not a chance. Knowing other languages always helps learn a new one, but
there is no reason to spend time learning something other than your
target.

After some mistakes with hiring some people who only understood high level
languages and hadn't a clue how a computer actually worked I've taken to
being very reluctant to hire someone who's never written assembler. They
don't have to have done much work in assembler, just a college course will
do, but that's enough to give them a clue why similar looking lines of high
level code might have a factor of 1,000 difference in execution times.

Really one might prefer only to hire people who've written compilers, but
that's a bit like wanting to hire programmers only if they've got a
touch-typing qualification - there aren't enough around.
 
L

Loco Pollo

Tim Ward said:
After some mistakes with hiring some people who only understood high level
languages and hadn't a clue how a computer actually worked I've taken to
being very reluctant to hire someone who's never written assembler. They
don't have to have done much work in assembler, just a college course will
do, but that's enough to give them a clue why similar looking lines of high
level code might have a factor of 1,000 difference in execution times.

Really one might prefer only to hire people who've written compilers, but
that's a bit like wanting to hire programmers only if they've got a
touch-typing qualification - there aren't enough around.

depends on what your doin. if your just writing front ends for
database apps it really doesn't matter how efficient your code is. any
modern machine will have minimal impact based on code(unless your
really really bad about it). whats important is your understanding of
sql and making your code easy to read and modify. but yeah when you
deal with high level languages you get spoiled and don't bother with
exactly how many lines a function will execute.

question is how much does this matter when your just writing a java
applet that'll end up runnin locally on someone's machine and whether
the performance difference will make up for the cost of not being able
to come up with a solution quickly and under budget. not to mention
the cost of modifications in the future.
 
F

Frank Birbacher

Hi!
If C++ was so great then why
are the practitioners migrating to Java?

Tell me why linux is not implemented in Java? It would be one Java for
all platforms... ;)

Java is completely different from C++. Java is generic and C++ is efficient.

I still like C++ more than Java, because Java is not as mature as C++
yet. Java is somewhat limited in its syntax (e.g. operators cannot be
overloaded).

Frank
 
S

Scott Ellsworth

Tim Ward said:
After some mistakes with hiring some people who only understood high level
languages and hadn't a clue how a computer actually worked I've taken to
being very reluctant to hire someone who's never written assembler.

For me, this is more a question of experience. Someone with a lot of
experience has almost always had to delve into the machine pretty deeply
on at least one occasion. Junior employees, on the other hand, may not
have.

I have found profilers to be my watershed question. If someone has used
one, and understands the "premature optimization is the root of all
evil", especially why it is evil and why premature is such an important
word, then they probably understand just how things can differ.

Heck, asking the loaded question "I am told that my matrix factorization
routine runs 100x more slowly on one machine than another. Where to
begin hunting down the problem?" will often tell me a great deal about a
candidate. If he knows to ask whether it uses a square root, then
points out that on G3 and G4 architectures, the square root fn was in
software, he gets extra points, but merely considering that
architectures differ is a good start.
They don't have to have done much work in assembler, just a college
course will do, but that's enough to give them a clue why similar
looking lines of high level code might have a factor of 1,000
difference in execution times.

My experience says that anyone who can haul out a profiler gets the low
level understanding points. I do not do embedded systems, though, where
even C can be too high level, and the best coders write code that is
several orders of magnitude faster and somewhat smaller to boot than
that written by the also rans.
Really one might prefer only to hire people who've written compilers, but
that's a bit like wanting to hire programmers only if they've got a
touch-typing qualification - there aren't enough around.

Heh. I know what you mean. When I was a wee college lad, I skipped the
formal compiler design course, figuring I would not need it. I then got
to pick it up from the dragon book and a lot of sweat when I was put in
charge of implementing a matrix language for a client.

Scott
(e-mail address removed)
Java, Cocoa, WebObjects and Database consulting
 
S

Sudsy

Loco said:
depends on what your doin. if your just writing front ends for
database apps it really doesn't matter how efficient your code is. any
modern machine will have minimal impact based on code(unless your
really really bad about it). whats important is your understanding of
sql and making your code easy to read and modify. <snip>

You wouldn't make many DBAs happy with that attitude. No matter how
sophisticated the tools, it's STILL possible to come up with horribly
inefficient SQL. Have you not heard stories about 1,000 fold (or more)
performance improvements from simply rewriting queries?
That's why I'm frightened by providing ad hoc query capabilities to
the users. Programmers who don't understand and appreciate the schema
can be just as dangerous.
While YOU might not care that a query takes five seconds to complete,
your users might well be expecting sub-second response times. And if
you're dealing with a web application then you'd better be working
hard at squeezing the last iota of performance out of your servers
before 10,000 people start simultaneously hitting them.
Sorry, but the old "throw more hardware at it" argument still doesn't
hold water.
 
S

Sudsy

Frank said:
Hi!



Tell me why linux is not implemented in Java? It would be one Java for
all platforms... ;)

It's not implemented in C++ either... ;-)
Java is completely different from C++. Java is generic and C++ is
efficient.

Recent benchmarks on the server side suggest that there is only
~2% performance penalty for using Java.
I still like C++ more than Java, because Java is not as mature as C++
yet. Java is somewhat limited in its syntax (e.g. operators cannot be
overloaded).

Frank

Thank you for illuminating two points:
- you're posting to a Java newsgroup, yet
- Java is limited because it doesn't offer operator overloading

Perhaps move the discussion to one of the advocacy groups or to
comp.lang.c++ and denigrate Java some more. Your choice.
 
F

Frank Birbacher

Hi!
Thank you for illuminating two points:
- you're posting to a Java newsgroup, yet
- Java is limited because it doesn't offer operator overloading

Perhaps move the discussion to one of the advocacy groups or to
comp.lang.c++ and denigrate Java some more. Your choice.

I just said I like C++ more than Java. I didn't say Java was crap. I
like Java, too. And I gave reasons for my opinion. Did I do something wrong?

Frank
 
T

Tim Ward

Frank Birbacher said:
I just said I like C++ more than Java. I didn't say Java was crap. I
like Java, too. And I gave reasons for my opinion. Did I do something
wrong?

Yes. On this newsgroup some people don't make you welcome unless you say C++
is crap.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top