So, I'm taking programming class in high school. To my unfortunate knowledge, we are three weeks into coding in JAVA. I expected C++, but you can't win 'em all, right? Anyway, I was wondering what are the pros and cons of programming in JAVA?
After learning java I find it pretty easy to understand other languages. I'm not at the point where I can write my own homebrew, but I've been able to mod several apps without prior knowledge of C.BloodWolfJW said:No coding homebrew?! NOOO!!!!
What kind of argument is that? How can the lack of a language feature of this crucial kind be beneficial?bowser said:Well one of the main pros is there are no pointers in Java
(always found it hard to understand pointers)
QUOTE(ronfar23x @ Sep 4 2011, 02:05 PM) NO POINTERS! (as bowser stated above)
Makes it harder to write viruses.Mazor said:What kind of argument is that? How can the lack of a language feature of this crucial kind be beneficial?
With your logic, a language that has as little features as possible is top tier.bowser said:Makes it harder to write viruses.Mazor said:What kind of argument is that? How can the lack of a language feature of this crucial kind be beneficial?
The "increased security" argument you're pulling is terrible. It's ridiculous to deliberately limit the power of a language by removing features, limiting the tools available to the developer just to prevent him from using them maliciously.bowser said:Java lacking pointers doesn't make it a language of few features. It has a lot of other great features that C++ doesn't have. At the same time, it also lacks some features of C++. Forget about just C++, on a broader scale there are so many other languages out there like PHP, Ada, etc. to name a few. Each one has its own pros and cons. Each one is best suited for particular applications.
I have said nothing that contradicts any of what you're saying here in this thread, in fact you're mostly just reiterating my view which I have expressed on the forum before. However it would be very interesting to see you have a go at listing "a lot of great features that C++ doesn't have", go ahead.
I think Ada is used a lot in defense/military applications (I may be wrong about this one).bowser said:Applications that require a high degree of control by the programmer on memory management are better off written in C++. It's easier to write complicated programs in Java because of the availability of a large number of built-in and 3rd party libraries, not to mention its high portability to different environments.
In which languages have you been programming? Your view of C++ really seems a bit twisted. For when memory management is one of the main concerns, assembly or most commonly C would be the optimal choice. C++ is for when you want something more high level that's faster to write and easier to maintain while still not bloated to infinity and running in a virtual fantasy land like Java does. As for portability, guess what the JVMs on platforms that can run Java are generally written in? C++. Virtually every platform that supports Java supports something lower level (that the JVMs are written in), so there's no benefit to Javas advantage in amount of platforms you can write for. The only advantage is that you have to make fewer platform-specific adjustments.
QUOTE(bowser @ Sep 4 2011, 09:42 PM)
Pointing back to your original point (pun intended), lack of pointers can be beneficial because it simplifies programming and also provides security to a certain extent.