DISCUSSION: Java vs. C++
This thread is to discuss the article titled:
Java vs. C++ Quote:
|
Java is easier to teach and to understand than C++ (read: NO POINTERS, TOTAL encapsulation), but C++ is still the industry standard for application development (it's faster, more compact, takes advantage of hardware, closer to machine-level, etc.), and is a MUST-learn. Personally, I believe that they should be taught the same year--Java first semester, and C++ second semester.
|
A couple clarifications
Overall I enjoyed the article. The hard measurements reinforce our general conception that C++ is faster and closer to the hardware. Java is excellent for learning OOP, especially if you study the swing libraries and the Model-View-Controller architecture.
Another aspect to consider when deciding to specialize in java or C++ is the job market. Java was hot a couple years ago, but there are now loads of java programmers out there. You will need more than a programming language alone to compete in the job market. Quote:
Quote:
Quote:
2) The idea of a 'self running' jar file is misleading. It still requires that a suitabl java runtime environment be installed. 3) It is only 'clickable' if the OS recognizes the .jar extension and has a proper java command line mapped to call the main class. Quote:
2) perl in a cgi context is web based, but perl does very well as a scripting language without any web aspect. It is easy to set up on a single machine and extremely useful for programs requiring heavy text parsing/processing. 3) PHP is primarily a web based language, but a standalone interpeter can run scripts independently of the web. |
I've just finished my university studies so hopefully I can add something useful. :)
A year or two before I started(2003) a Computer Science degree, the primary language taught was C++. The then changed to Java and restructured the entire course around it. First year we had Programming Java 1 and 2. Second year I did "Object Oriented Programming 1 & 2", it was pretty much Swing, threads, JSP and Servlets. In my 3rd and final year was the first chance to study C++( however it was optional). The lecturer got the labs setup with .NET but really didn't mind what we used to write the code. In my 4th year which I did a honours degree, they introduced a "Algorithms and Structures" subject for first years which was all C++. They must have realised putting all their eggs in one basket(ie. use java exclusively) was a bad idea. As I look for jobs now there's pages and pages for J2EE/Java developers. The interesting ones (to me anyway ;)) are the ones that want C++ experience. Speaking to lecturers around he uni. though, they don't think it should be a Java vs. C++ debate(at first anyway). They're all for python or some type of scripting language then going on with something more complicated. Before uni. I had programming experience in VB so I found java/c++ quite easy. The important thing is to teach concepts first(using an easy language), then figure out which more difficult language to go with. I know time is tight and that's why they want a language that does everything AND be easy at the same time. From what I've seen, that just puts students off programming. One extremely frustrating thing they never paid attention to was deployment of the programs we had just created. Sometimes I need to write a program up quickly for me or a friend and find myself in a hole. I spent 3 years learning java but was never taught about .jar files. That's fine, I'll pick it up myself. But lets says I sent my .class files to a friend, he then has to install all the java libraries and goto the command line or setup class paths. Same with C++ in .NET and all the .Net libraries. C++ has the advantage though because you don't need .NET to write C++ programs. That's pretty much why I'd lean towards C++. If you get an idea in your head and you put some code down, it'll be easily distributed. |
I am personally of the believe that C is a far superior language than java. Having known and used C independently for some time then being taught java in the class room I have been able to distinguish some key elements that I dislike about java. For example the incredible ability of java to turn simple tasks into cumbersome blocks of code. A very simple example would be just doing standard io you have to make objects just to take in command line arguments, seems overly cumbersome to me :\ but maybe I'm just old school. I don't want to keep ranting at risk of sounding like a cynic
But to each his/her own... |
vki,
Command line arguments? You mean like an array of Strings that's passed to main(String []args)? How simple is that? Code:
// something like this? Java is great for network i/o, and servlets are a lot easier to code that C/C++ cgi. But, for windows gui applications I'd say C/C++ wins. I don't think anyone will argue that java is faster than C, but development costs may be less with java depending on the project. Want to learn some patterns and MVC architecture - go with some swing lessons. It takes OO to a whole other level. Learning java is a great OO teaching mechanism. The whole idea of programming to interfaces and implementing in derived classes will give great background for future C++ learning and development. Don't expect to succeed as a programmer with an either/or attitude. You will eventually need both, and maybe some vba and shell scripting thrown in. We do a lot with java web front ends and C stored procedures on the back end. \0 |
All times are GMT -5. The time now is 07:26 PM. |