New Posts  All Forums:Forum Nav:

C/C++ or Java

Poll Results: C/C++ or Java

 
  • 50% (29)
    C/C++
  • 49% (28)
    Java
57 Total Votes  
post #1 of 74
Thread Starter 
Not which you use, but which is better designed.

Vote and reply only if you have experience with both.
post #2 of 74
I took a Java class and didn't like the language. I'll be taking a C class this fall. Java isn't very efficient. It needs to run through the interpreter, so really isn't as fast as C or C++. Choose it only if you're interested in creating web-based applets, and multi-platform applications.

My suggestion is that you learn C, then move to C++. I'm a member at the Ubuntu Linux boards, and I'm missing out on projects because I took the wrong route. I regret not starting with C.
post #3 of 74
Quote:
Originally Posted by TrickyPhillips
I took a Java class and didn't like the language. I'll be taking a C class this fall. Java isn't very efficient. It needs to run through the interpreter, so really isn't as fast as C or C++. Choose it only if you're interested in creating web-based applets, and multi-platform applications.

My suggestion is that you learn C, then move to C++. I'm a member at the Ubuntu Linux boards, and I'm missing out on projects because I took the wrong route. I regret not starting with C.
Missing the point of the poll. The question is which is better designed.

(Nietsnie is polling this to resolve an argument he and I are having)

*edit* Plus, you're supposed to have experience with both to respond
post #4 of 74
Quote:
Originally Posted by 1 of 42
The question is which is better designed.
By "designed", I assumed he meant efficiency-wise. I assumed he was planning on learning a language, so I threw in my own comments.

Please be more descriptive, as "designed" could mean efficiency, ease of use, portability, or many other aspects.
post #5 of 74
In terms of the syntax and semantics, no question Java is better designed. And when you're doing large program or an API, you will thank yourself for choosing the less clutter Java and better adhering to the OO principle

I still use C/C++ to write quick programs or sometives native Java function which need to speed up.
post #6 of 74
Yet in terms of efficiency, C/C++ is no doubt the fastest language of the two.
post #7 of 74
I voted C++. I've taken one class (semester) on C++ coding and read up on Java a little bit.

I generally stay away from programs written in Java because:
1. They require JRE
2. They are horribly slow
3. JRE's APIs provide hideous-looking UI features
post #8 of 74
Quote:
Originally Posted by epp_b
I voted C++. I've taken one class (semester) on C++ coding and read up on Java a little bit.

I generally stay away from programs written in Java because:
2. They are horribly slow
You might want to check the benchmarks now on the www.
post #9 of 74
C/C++ due to flexibility.

If I want to shoot myself in the foot, (a) I have a good reason to do so, and (b) dang it, it's my program, so shut the heck up and lemme do it!

I've done Java and now onto C#. Sometimes, the hoops you have to jump through just to get something out of the ordinary to work is just... annoying, to say the least.

You spend almost as much time fighting the language as you do fighting the base platform. With C/C++, you fight mostly the quirks of the base platform and not the language. (Where base platform is the system you're running on, not things like the JRE and the CRT libraries.)
post #10 of 74
C++ is a much richer language and probably the best one to build a platform on since once you learn one language you can hop over to other languages easily. If you are looking from a more funtional language that you will use often then I would go with java.
post #11 of 74
I have to go with C/C++ as well. It has much more flexibility and its better for things like Device drivers. For web applications Java is great but for real down and dirty systems programing C++ is much better
post #12 of 74
If you know your intended audience, C++ is probably the better route.
If you do not know your intended audience, or your audience is everyone, Java is the better route.

Java deals with its own memory allocations and deallocations. That's one thing that is very difficult for beginning C++ programmers (like me) to understand, especially since I learned how to program with PHP and Java.

The biggest benefit of using Java is the javadocs: one standardized location for all of the standard classes and their methods in one, well written, well organized manual. C++ lacks this, and it's yet another thing that makes C++ hard if you learned Java first.

I'd suggest this: do C, then C++, then Java.

If you're looking to learn how to program from the beginning, I'd recommend Python, actually.
post #13 of 74
You're asking the equivalent of "Is a hammer better designed than a wrench?"

You use the right tool for the right job. If you want your application to run on most any platform and/or be tied into some web development then Java is intended(ie 'better designed') for that. If you need speed and something that's more tied into the hardware then C++ is intended(better designed) for that. That's why web development using struts, JSP, etc. uses Java and game development uses C++. There should be no question as to which language to use, like there should be no confusion as to when you would use a hammer instead of a wrench. I'm guessing you're new to programming if you're asking this question but that's the gist of it. Each language was developed for it's intended purpose so you can't just learn one and stick with it. You use your array of tools.
post #14 of 74
I think Java is a better designed wrench than C++ is a hammer. Which is not to say that Java is particularly well designed!

C++ was an attempt to graft object orientation onto C, which was the most popular language at the time. The sense in which C++ is better adapted to hardware is mostly due to the fact that C++ contains C, and C was/is a language designed to be close to the hardware (some have called it a somewhat advanced assembly language). C++ is loaded with problems, memory (mis)management being one of the banes of my existence.

One other observation: a language being well designed doesn't seem to correlate with widespread use of the language, etc. Look at how popular Basic is!
post #15 of 74
Thread Starter 
(Just to clarify: I'm not choosing a language to learn, as I know both.)

Thanks for all your opinions
post #16 of 74
i don't understand how you can just group c and c++ with each other, just becuase they have smiialar names doesn't mean there much beyond syntacially like each other, but you if are going to go that boat, java also very much like C in that respect, C++ and C are very different, C is not object oriented (well unless you use object C, but that is no C, that is object C) when it comes down to it C would be the simpliest, Java the most capable, and slowest, with C++ being the hardest to get your head around but a good middle ground
post #17 of 74
While people might tout the fact that Java has a better language memory management, it may still have crappy system level memory management, which may make it even worse than anything C/C++ CRT has since it affects all programs based on that runtime.

Also, if you don't work properly with the GC, then you could have massive memory bloat in your program.

Obviously, the counter-argument to C/C++ is the fact that you can have orphaned objects due to mismatched malloc/free (or new/delete), and corrupt pointers.
post #18 of 74
PERL! ahahah
post #19 of 74
Quote:
Originally Posted by BlinKSilver
i don't understand how you can just group c and c++ with each other, just becuase they have smiialar names doesn't mean there much beyond syntacially like each other, but you if are going to go that boat, java also very much like C in that respect, C++ and C are very different, C is not object oriented (well unless you use object C, but that is no C, that is object C) when it comes down to it C would be the simpliest, Java the most capable, and slowest, with C++ being the hardest to get your head around but a good middle ground
I think most people clump C and C++ together since C source code, for the most part, can be compiled directly with a C++ compiler with little to no change.

Thus, C++ is a superset of C, and what affects the subset will affect the superset.
post #20 of 74
Quote:
Originally Posted by smilepak
PERL! ahahah
People many times abuse Perl with all kinds of shortcut operators; making someone else's code extremely difficult to read.

Back to the topic; C++ is a much more efficient language that gives you much more options in terms of memory allocation, takes the minimum amount of overhead of any high level language, and allow you to access features on the hardware level much easier than Java.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Notebook Forums - General