• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

what are the facts on java vs C# vs C++?

TobiasTheViking

Resident Viking Autist
Joined
Jun 25, 2005
Messages
6,925
K, so far i have learned, at home Qbasic, Pascal and php.

From studying i have learned Mosml and C++.

The next half year, i'll be learning Java and C#.


Now, i run linux(gentoo) exclusively, but that doesn't mean i'm zealous against .net. I can see certain good things in it.

As for java.. I've had bad experiences (slow guis.. and abuse of resources on the few non gui apps i've tried).

So, i usually steer clear of java.

But, what are the facts on these three different languages? Google gives me mostly flame wars and unsubstantiated opinions.

Personally, i can't see how either C# or java can be faster than C++(considering both of them are virtual machines). On the other hand both of them may( i don't know) have other virtues.

I'm not just talking speed, also security and everything else interesting.

Sincerely
Tobias.
 
Java has garbage collection. And it's easier to learn than C++. You can stray further from the OO paradigm with C++, though.

You also have to take into account what other APIs and frameworks there are for each language. Most of the ones I want to use are in Java, so I use that. Personally, I find programming in Java a more pleasant experience than C++.
 
Java has garbage collection. And it's easier to learn than C++. You can stray further from the OO paradigm with C++, though.

You also have to take into account what other APIs and frameworks there are for each language. Most of the ones I want to use are in Java, so I use that. Personally, I find programming in Java a more pleasant experience than C++.
Interesting. So basically you'd say C++ is "better" (faster, more powerful etc) but Java is often preferable due to being easier to use and having other "things" (APIs etc) that support it, making it generally the better choice? (geez sounds sorta like UNIX vs Windows don't it ;) ) Do you think hardware, net apps etc are at a point where more often than not the pros to C++ as stated tend to be moot?

As a mere BA/PM mortal, I can't confirm any of this first-hand, but this is generally what I'm hearing from other developers.

In any event, I find this very interesting. Look forward to add'l responses.

PS what about C#? In fact what in the flip IS C#? Man I'm out of it on programming stuff...
 
PS what about C#? In fact what in the flip IS C#? Man I'm out of it on programming stuff...
.net
C# is .net

Well, not really, but if you know what .net is, you are most likely mistaken, and you really know what C# is. :D

Atleast that is how it was for me till today.

But yes, i have heard from one of my friends that C# should be superior to java.
 
I find JAVA more cumbersome than C++. In fact, I'm much happier with plain old C. Yeah, I don't program that much (except to speed up some R functions).
 
Interesting. So basically you'd say C++ is "better" (faster, more powerful etc) but Java is often preferable due to being easier to use and having other "things" (APIs etc) that support it, making it generally the better choice?
Let me, as ever, preface my comments by stating that I have no formal computer science education, so grain of salt and all that.

C++ is definitely more flexible, and faster. You can do more with C++, like functional programming (using pointers) and template programming, which isn't possible in Java, due to the latter's implementation of generics.

But for object oriented programming, given the choice, I would always choose to program in Java over C++. The only thing I miss from C++ is the ability to overload operators - as a result, implementing mathematical and statistical concepts can be very cumbersome.

Do you think hardware, net apps etc are at a point where more often than not the pros to C++ as stated tend to be moot?
I think that, if you had no legacy code to support, equal access to a team of hardened C++ and Java veterans, and if you were going to do some standard enterprise application, involving a big database with web pages on top, there's no question that Java would be the first choice. I doubt that reality is ever that simple, however.

what about C#? In fact what in the flip IS C#? Man I'm out of it on programming stuff...
C# is a .NET thing - it's very similar to Java, although it's perceived that it's being doing more of the innovating than Sun lately, and the last update to Java was Sun playing catch-up.
 
C# was Microsofts response to Java, when Sun rebuffed it's attempt to hijack Java.

C# is actually a very well thought out programming language, designed by the man behind Delphi. (Microsoft stole him).

It is trying to be 'one step ahead' of Java, although there is nothing you can do in C# that can't be done in Java.

Java is more universal in terms of platforms it runs on, C# is really just for windows despite the open implementations such as Mono. Java does not integrate as well with Windows, while C#, via .Net, does.

C# is very nice to use, very efficient for a language that uses a VM, but not as widely used as Java.
 
C# was Microsofts response to Java, when Sun rebuffed it's attempt to hijack Java.

C# is actually a very well thought out programming language, designed by the man behind Delphi. (Microsoft stole him).

It is trying to be 'one step ahead' of Java, although there is nothing you can do in C# that can't be done in Java.

Java is more universal in terms of platforms it runs on, C# is really just for windows despite the open implementations such as Mono. Java does not integrate as well with Windows, while C#, via .Net, does.

C# is very nice to use, very efficient for a language that uses a VM, but not as widely used as Java.
I agree on most counts - I've been doing 95% .NET work for a little over four years now, and I don't have nearly as many gripes with the system as a whole as I have with others I've been equally involved with (e.g. I'll run amok if I ever even see COM via MFC again).

There is one thing that the .NET runtime has always had over Java - member-specific, user-supplied metadata inspectable by the built-in reflection engine. They're typically referred to as 'Attributes', and they have made writing plugin frameworks a complete snap :) I'm not aware of anything similar in Java that's more sophisicated than predictable name-mangling.

The .NET 2.0 framework also has one up on the new JVM (1.5?) in that it's generics implementation makes generics first-class members in the type system, while the JVM's implementation is primarily compiler magic to maintain backwards compatibility with the boatloads of existing Java code out there.

I haven't use .NET 2.0 on anything production, so I'm not really fit to comment on how well they actually utilized the generics in the .NET base class library.
 
I've been programming in C++ for fifteen years. It is the object-oriented language that I know the best, so it is the one I prefer to use when I have a choice. I've written in both C# and Java and appreciate aspects of both languages, but I use C++ when I can.

I use C++ for my research in algorithm design for challenging problems. I often need to tune my code for speed as much as I can.

For example, one program for factoring that I'm working on will be expected to run full-speed for months if needed (checkpointing and resumption are being added). I expect that I'll be running it on different problems on different machines simultaneously. Speed improvements can lead to real savings in both time and money.

Most of my research programs implement solvers for NP-complete problems and speed is of great importance.
 
Well y'all blew by me a handful of posts ago but it's still interesting. um I think.
 
PHP uses C syntax (like C++ and java) but PHP has variables more like Perl. Unfortunately, as PHP is normally used to produce HTML output, it becomes difficult to maintain a proper object-oriented approach.

Plenty of jobs out there for PHP jockeys at the moment.
 

Back
Top Bottom