OK shoot me, but with the latest additions to java most of the claimed advantages of C++ over java have disappeared and I now wait to get one clear non-arguable advantage of C++ over Java for the software developer.
Java better than C++
Collapse
X
-
See also my entry in this forum's thread Best programming language.
This dicussion is the same as: why is Ford better then GM?
People tend to stick to what they have learned and have coming to like. And if you learned all in's and out's of C++, you usually stick with it until you need something that isn't posisble in C++, only then you will look for a better language. Or maybe curiosity. But usually not on objective, measureable, grounds.
So your statement may be true for you, it maybe not for someone else.
Ronald :cool: -
While it is generally true that one prefers what one already knows, for true comparisons this should not be an issue. Just because I've spent more time coding in c than I have in Java should not be something I use to compare the two languages.Originally posted by ronverdonkSee also my entry in this forum's thread Best programming language.
This dicussion is the same as: why is Ford better then GM?
People tend to stick to what they have learned and have coming to like. And if you learned all in's and out's of C++, you usually stick with it until you need something that isn't posisble in C++, only then you will look for a better language. Or maybe curiosity. But usually not on objective, measureable, grounds.
So your statement may be true for you, it maybe not for someone else.
Ronald :cool:
Instead we should look at
garbage collection effort, platform dependance, speed, areas of application, paradigm support etc.
It does not matter how many times I have written a destructor in c++, the Java gc is much better for me the programmer and similar arguments...Comment
-
Although Java is more portable across environments, if I had to write some quick and dirty and small program to update something on someones system, it would be in C++.
The only thing that scares me about Java is the reliance on the RTE and library stuff. I also have more of a feeling of what is happening with C++ and what will be slow or fast.
Other than that, I think Java should be encouraged so that it can be ported strait to Linux or vise versa.
Hmm, I Suppose that I really should take another look at it.Comment
-
Certainly when correct programming is done,Originally posted by StarasorisAlthough Java is more portable across environments, if I had to write some quick and dirty and small program to update something on someones system, it would be in C++.
The only thing that scares me about Java is the reliance on the RTE and library stuff. I also have more of a feeling of what is happening with C++ and what will be slow or fast.
Other than that, I think Java should be encouraged so that it can be ported strait to Linux or vise versa.
Hmm, I Suppose that I really should take another look at it.
c++ will be faster than java and c++ will
get you closer to the memory.
My argument is these days speed of a programming laguage
is no longer an issue and getting better
control of memory is also not neccessary
owing to the increasing speed of processorsComment
-
Then that must be the platform you work on. When you have a ~200MHz processor and you are trying to stream several megabits/second of data through it then speed of your language and the efficiency with which the compiler converts it to efficent machine code are still big considerations.Originally posted by r035198xMy argument is these days speed of a programming laguage
is no longer an issue and getting better
control of memory is also not neccessary
owing to the increasing speed of processors
And on GC in a embedded application when memory is normally an extremely tight resource then a GC just does not provide enough control of memory allocation/deallocation.
Don't get me wrong, Java is good at what it does and has lots of plus points. It just is not suited to all platforms and to be honest would really expect any 1 language to ever achieve that?Comment
-
You are right. How we all wish there was just one platform where everything runs on! But to be more honest, which language do you think suits more platforms than other languages?Originally posted by BanfaThen that must be the platform you work on. When you have a ~200MHz processor and you are trying to stream several megabits/second of data through it then speed of your language and the efficiency with which the compiler converts it to efficent machine code are still big considerations.
And on GC in a embedded application when memory is normally an extremely tight resource then a GC just does not provide enough control of memory allocation/deallocation.
Don't get me wrong, Java is good at what it does and has lots of plus points. It just is not suited to all platforms and to be honest would really expect any 1 language to ever achieve that?Comment
-
Since wxWidgets got wrapped for Python, this language (often overlooked on this forum for some reason) now looks native on all platforms supported by wxWidgets. Has GC and is actually readable by a mere human.Originally posted by r035198xYou are right. How we all wish there was just one platform where everything runs on! But to be more honest, which language do you think suits more platforms than other languages?Comment
-
Assembly. As portable as C and runs anywhere, at least on the same processor. Syntax is pretty much the same no matter what assembler you use and there are few abstractions or ambiguities.which language do you think suits more platforms than other languages?Comment
-
Yep. I began my illustrious (ha-ha) carrer writing in assembler (moto style) and still enjoy thinking like a compiler (as an intelectual challange). But seriously, abstaction is what good languages do well, is it not?Originally posted by drhowarddrfineAssembly. As portable as C and runs anywhere, at least on the same processor. Syntax is pretty much the same no matter what assembler you use and there are few abstractions or ambiguities.Comment
-
That's right and it can be helpful but it adds to the confusion. I started out in hardware so assembly was the only thing. Actually, coding in hex. I do the same as you. I visualize pointers in C as the actual register pointing at a memory address. When code starts 'dereferencing objects' I get a little crazy.Comment
-
Hi everyone,Originally posted by r035198xOK shoot me, but with the latest additions to java most of the claimed advantages of C++ over java have disappeared and I now wait to get one clear non-arguable advantage of C++ over Java for the software developer.
Java? C++? which one? I prefer to use C++ as it enables pointers, pointers can be very handy. Some of my friends even claim that Java is the mother of C++? Any review on that? Good luck & Take care.Comment
-
They may be talking about the OOP part of C++ but C is the mother of C++. Bjarne Stroustrup worked at Bell Labs with K&R and never worked at Sun.Some of my friends even claim that Java is the mother of C++? Any review on that?
In fact, Bjarne himself says Java inherited C++ features. Bjarne StroustrupComment
-
Those we the days! I think C and embedded assembler is still the way to do it, best of both worlds. At least you have some feeling for the computer and its inner workings. OOP and Windows spoiled all that, it's like assembling Lego bricks now.Originally posted by drhowarddrfineThat's right and it can be helpful but it adds to the confusion. I started out in hardware so assembly was the only thing. Actually, coding in hex. I do the same as you. I visualize pointers in C as the actual register pointing at a memory address. When code starts 'dereferencing objects' I get a little crazy.
Ronald :cool:Comment
-
Since I've never used either language commercially I won't comment on preformance of C++ vs. Java.Originally posted by ronverdonkThose we the days! I think C and embedded assembler is still the way to do it, best of both worlds. At least you have some feeling for the computer and its inner workings. OOP and Windows spoiled all that, it's like assembling Lego bricks now.
Ronald :cool:
One point I would like to make is C is the first language I ever learned and I believe sometimes that all programmers should have to learn it as a rule. The basic understanding of C provides a progammer with an understanding of the rules of programming that is just not provided in my experience with instruction in C++ or Java.
I remember in college a student asked the Java lecturer if a method was like a function. To which she replied, there are no such things as functions in OO programming.
What do you think?
MaryComment
Comment