Going from C# to Java

marble_eater said:
And just a note, this thread was over a month old. I personally don't mind, but the posting guidelines do ("Threads that have been inactive (no new posts) for one month or more should be considered archive-only and should be left alone (except by the thread starter).").
Uhh...chill pill? I think the "rule" is intended to help keep order in the primary forum sections (such as General .Net) where people have need more immediate help and topics get stale very quickly. "General Discussion" is more open to meandering posts and long term discussions I would think.

Anyway, C++ was an attempt to make a better C (thus the ++) and a more *buzz* Object Oriented language. From a purist perspective, C++ is not object oriented at all because though you can create objects, and your have encapsulation, inheritance, information hiding, polymorphism, and so on, you don't have a unifying, top level Object (key concept) from which all other objects are derived. You can use a lot of non-objects in C++ as well. C++ can be very object oriented, but it cannot be completely object oriented. It's like writing VB.Net code but still using VB6 stuff such as MsgBox.

And I'm not saying it's a bad thing either, I think it's a really good thing that C++ isn't completely object oriented. It gives you a lot of power to do a lot of really amazing things. But it also makes rapid development kind of a pain sometimes and design is more of an art. That's one of the great things about Java (and later C#) -- they are completely Object Oriented and 100% internally consistent. (well, Java is more like 97% object oriented, taking into account the fact that primitives aren't objects. Interesting article)

Check out the Qt toolkit, if you are curious. That toolkit makes C++ true object oriented (within the Qt namespace), and in the process it starts to look a lot like C#/Java (you also get a lot of great widgets and useful objects). Also, the C++ Standard Template Library gives you a little bit of free, reusable functionality, though certainly not to the extent of .Net or Java.

I didn't mean to take things off of Java talk so much, but I think for a person transitioning from C++ it is important to know the differences. Coming from C# should be much easier conceptually.
 
Back
Top