Originally Posted by
trent.josephsen
Well, lest the OP see consensus, I don't like C#, both because it's a proprietary Microsoft language and because it's just generally ugly like the Java clone it is. (Mind you, I have very little practical experience with C#, standard disclaimer applies.)
My main criticism of Java, which I imagine applies just as well to C#, is that it's an enormous language and you need to know a lot of stuff to use it properly -- a lot of stuff you won't know as a beginner, and you won't understand the reasons for all of it until you've been programming for probably at least a few years. Even C, in my not so humble opinion, would be better for beginners, and I don't recommend C because it's kind of overwhelming itself. It's why you see so many recommendations for Python in threads like this.
A Java developer was once quoted as saying "C# is what Java would be if Sun had the budget for it." (Or words to that effect; I can't find the exact quote unfortunately.)
C#, the language, is not proprietary. Portions of the .NET framework on which it tends to rely are, but the language itself is not. And -- at the severe risk of running into a "Mono is evil!" "No, it isn't!" debate -- those few portions of the .NET framework that are at issue have been licensed for free use with Mono, so the proprietary-or-not debate is really a non-issue.
Personally I think C# is a lot cleaner than Java, and has some really nice features I wish Java had. Things like iterators for for-loops:
C#:
Code:
String[] someStrings = { /*stuff here*/ };
for(String s in someStrings)
doSomethingWithEachString(s);
versus Java:
Code:
String[] someStrings = { /*stuff here*/ };
for(int i=0; i<someStrings.length; i++)
doSomethingWithEachString(someStrings[i]);
It's a minor difference, but the C# version is more intuitive to me.
There's also the nice feature of Properties in C#, instead of explicit Get/Set methods in Java:
C#
Code:
class SomeExampleClass
{
private int mustBeEven;
public int Value
{
get {return mustBeEven;}
set {
if(value % 2 == 0)
mustBeEven = value;
}
}
}
...
SomeExampleClass foo = new SomeExampleClass(2);
Print(foo.Value);
foo.Value = 1;
Print(foo.Value);
foo.Value = 4;
Print(foo.Value);
Java:
Code:
class SomeExampleClass
{
private int mustBeEven;
public int getValue
{
return mustBeEven;
}
public void setValue(int v)
{
if(v % 2 == 0)
mustBeEven = v;
}
}
...
SomeExampleClass foo = new SomeExampleClass(2);
print(foo.getValue());
foo.setValue(1);
print(foo.getValue());
foo.setValue(4);
print(foo.getValue());
Anyway, that's just my take on the C# vs Java. Java has its uses (e.g. Android development), but given a choice I would prefer to work with C#.
I agree mostly with this, but would definitely not include C++ as a good language for GUI development. The rigidity of C++ along with the burden of memory allocation will make your job harder than it needs to be. Also GUI apps rarely tax your CPU at all so the speed of C++ will be a non-factor.
C++ with QtCreator is pretty nice for doing GUI programs. Most of the really hard/annoying parts of laying out the GUI is done via a Visual Studio-style GUI builder. Yes, there's the memory management issue to consider. And that is a major factor for a lot of people. Personally, I've done enough C++ that I'm comfortable with it, which is why I included it as a possible candidate for GUI applications. It wouldn't be my first recommendation to most people, but it is a viable option that deserves mentioning.
Possibly the biggest advantage of using C++ for a GUI program is that you have very easy access to any C or C++ library you need. And there are thousands (millions?) of those. Yes, many of them have bindings for other languages, but some don't. Or the other language bindings aren't complete, or have performance issues. Something to consider at the very least, depending on what kind of program you're creating.
Bookmarks