Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.






Taking a step forward to Java

Posted by superman3275, 02 April 2013 · 693 views

C++ is a great language. It really is, and can be used in a variety of ways.

Unfortunately, it is basically like someone took a handful of paradigms and shoved them together. We've got some procedural over here, some Object-Oriented over here, some Functional over here, and oh, look, some Templates! Oh boy, will my code look like someone made a cake. Except the cake will be a mix of seven randomly-chosen flavors, which are placed here and there, with some inside the others.

Even worse, I chose Object-Oriented. Or at least, the book I learned programming from was ten years old and only had C with Classes. This would be fine in 1983, however today I'm left in the dust. With a small knowledge of C++, and a gnawing hope for something new, I set out on the path to java, littered with virtual machines, byte-code and a dash of object-oriented. Wait, about that last one, I meant that someone took the bottle of object-oriented programming out of the fridge, cut a hole in it, and poured the whole thing on Java.

I want to think that I'm taking a step forward. And in reality, I am. I'm taking a step back in C++ though. My resolution is to stop C++ coding. Of course, I'm finishing Space Invaders, and I'm going to write applications in it occasionally, however for the foreseeable future I want to forget C++. Why, you ask? Well, I want to re-learn C++.

Or, more correctly, give myself a great programming language to use (Java) in a paradigm I've dipped my toes into (Object-Oriented Programming) to create beautiful applications which utilize all of Java.

So, there you go. My opinion on me learning Java. Also, you guys should buy books form O'Reilly. I had a test, and they came through:
Posted Image




Doing the language dance probably isn't going to help anything, to be honest. Every language has its warts and has its potential to create ugly or "incorrect" code (incorrect by the standards of the modern day, at any rate; it's a moving target). Jumping to another language will just give you the opportunity to make different kinds of mistakes in a new language and become discouraged again.

If you were to buy a book from, say, five years ago it might be more "correct" than the one you learned from. But it might not include things from the newish C++11 standard, so it wouldn't be "correct" by modern standards. So even if you learned from that book, you would still have to un-learn some things and re-learn others.

The field of languages is always advancing and changing. What is correct today might not be correct tomorrow. The answer to this is to adapt and grow, not to revert back to zero and try again along another tack. That is just no way to make progress at all.
PARTNERS