Keith Devens .com |
Sunday, October 12, 2008 | ![]() |
| It's such a fine line between stupid and clever. – David St. Hubbins (This is Spinal Tap) | ||
|
| ← Ping-o-Matic | War against "terrorism" or Islamic fascism? → |

Mats Henricson (http://www.henricson.se/mats) wrote:
Adam Vandenberg (http://flangy.com/) wrote:
Give that C# and Java are very close as languages (though different as platforms), would you rather spend your life doing:
(Java) someMap.put(key,value);
or
(C#) someMap[key]=value;
Or for lists:
(Java) value = someList.get(index);
or
(C#) value = someList[index];
Keith (http://keithdevens.com/) wrote:
Or foo == bar instead of foo.equals(bar)!
Of course I'm assuming that C# does the sensible thing, unlike what Java does (which was the very subject of the link above), and has value comparison semantics instead of reference semantics -- which it probably does given that '==' is probably overloadable (which wouldn't make much sense if it was supposed to have reference semantics).
And, don't forget str[index] instead of str.charAt(index) and list += foo instead of list.append(foo) (does C# do all these?)
hisham mk wrote:
political point: what about vendor lock-in? the fact that ximian & you are under the courtesy of microsoft.
Keith (http://keithdevens.com/) wrote:
AFAIK C# is an ECMA standardized language, and the Mono C# compiler is being written as an additional front-end to GCC (as open-source). The only part of the system that isn't completely standardized is the base libraries, I think. Frankly, assuming the existence of Mono, I'm just now surprised to realize that it seems to me that there's more vendor lock-in with Sun! Am I wrong?
ME wrote:
C# API are also patented... wich means at any moment, Mono could be simply declared as illegal so.. iens't it vendor lockin ?
What would happend if u develop a very big application under Linux and one morning, ur client calls u to tell u he read he don't have the right to use Linux anymore ?
You will pay the price for the servers and technologies migration ?
Keith (http://keithdevens.com/) wrote:
C# API are also patented...
By that I assume you mean the .NET class library. I'm not aware that it's patented (if you can substantiate this I'd be very interested), and I'm not even sure it's possible to patent a class library (though, with the patent office the way it is, who knows).
However, while Mono can't simply be "declared illegal", and Microsoft could never rightfully tell anyone they don't have the right to use Linux, you definitely are right to be wary simply because there isn't enough legal definition. Without protection in the form of a standard or Microsoft's guarantee of a royalty-free license, you just can't be sure.
Keith Gaughan (http://talideon.com/) wrote:
To paraphrase Stroustrup: Any language that people don't think sucks is one that nobody uses. 
Mike wrote:
I agree Java sucks. Although the virtual machine idea seemed cool for multi platform use, it is just way too inefficent. C/C++ still have my vote and probably will forever more.
Keith (http://keithdevens.com/) wrote:
Mike, you're probably not aware that most scripting languages, which don't suck, are also based on virtual machines. Most dynamic languages are compiled to some kind of bytecode before execution. Parrot, the engine that will Perl 6 (and probably other languages), is a virtual machine. The fact that Java runs on a virtual machine wasn't a criticism of it I gave in this post.
Java Sucks (http://javasucks.blogspot.com) wrote:
For an itemized list of specific ways in which Java sucks, have a look at:
http://javasucks.blogspot.com
DJ Hannibal wrote:
So I was doing a "Google fight" between Java and C#. Java (21,400 hits) clearly sucks much greater than C# (607). Check it out:
I started looking at the results in more detail. The first page of "Java sucks" results has some links with detailed criticism of Java. The "C# sucks" results are absurd for the most part, boiling down to "C# must suck because I hate Microsoft".
Elling wrote:
Hi guys. I was inspired to do some googlistics myself, upon reading this thread. Here are my preliminary findings:
Google search on "I love <language name>":
php 19200
java 18100
python 13200
perl 10600
delphi 7890
c++ 4330
c# 828
lisp 578
visual basic 351
cobol 169
Google search on "I hate <language name>":
php 695
java 15200
python 670
perl 792
delphi 307
c++ 1350
c# 236
lisp 272
visual basic 681
cobol 300
Love / hate ratio:
php 19200 / 695 = 27.63
delphi 7890 / 307 = 25.70
python 13200 / 670 = 19.70
perl 10600 / 792 = 13.38
c# 828 / 236 = 3.50
c++ 4330 / 1350 = 3.20
lisp 578 / 272 = 2.13
java 18100 / 15200 = 1.19
cobol 169 / 300 = 0.56
visual basic 351 / 681 = 0.52
Overall love / hate ratio in the world ("I love" / "I hate"):
97100000 / 28200000 = 3.44
Normalized love / hate ratio:
php 27.63 / 3.44 = 8.03
delphi 25.70 / 3.44 = 7.47
python 19.70 / 3.44 = 5.73
c# 3.50 / 3.44 = 1.02
c++ 3.20 / 3.44 = 0.93
lisp 2.13 / 3.44 = 0.61
java 1.19 / 3.44 = 0.34
cobol 0.56 / 3.44 = 0.16
visual basic 0.52 / 3.44 = 0.15
Not REALLY scientific, I guess..... But still kind of interesting. 
DJ Hannibal wrote:
That is very interesting. Thanks for the research.
It is also interesting that two of the languages, C# and Delphi, had the same chief architect, Anders Hejlsberg. Both had a pretty good love/hate ratio.
Just to change the results:
I love C#
I love Python
I hate Java
I don't know enough about Delphi to judge, and my attitude toward the other languages is pretty neutral.
alex2308 wrote:
go on learning c#, it rocks! the new framework offers easy to use methods to control everything you always dreamed of. forget java, it will blow your head. youll need a supercomputer with 16gb ram to run hello world on it.
btw, c++ rocks too! learn c++ AND c#. AND BLAME JAVA MWHAHA
ahmoy wrote:
"youll need a supercomputer with 16gb ram to run hello world on it."??? how about c# then?
208.125.4.90 wrote:
Give that C# and Java are very close as languages (though different as platforms), would you rather spend your life doing:
(Java) someMap.put(key,value);
or
(C#) someMap[key]=value;
Or for lists:
(Java) value = someList.get(index);
or
(C#) value = someList[index];
So C# builds library classes into the language? That seems like weak design. Java's way of working with collections is consistent with the way you work with other classes. I wouldn't want special syntax for commonly used objects because it makes things conceptually more complex.
Or foo == bar instead of foo.equals(bar)!
Of course I'm assuming that C# does the sensible thing, unlike what Java does (which was the very subject of the link above), and has value comparison semantics instead of reference semantics -- which it probably does given that '==' is probably overloadable (which wouldn't make much sense if it was supposed to have reference semantics).
And, don't forget str[index] instead of str.charAt(index) and list += foo instead of list.append(foo) (does C# do all these?)
Equals is a method of foo. You write the method when you create foo. It only makes sense that you call the method to use it. == has a different meaning in Java. Overloading == to call .equals would eliminate that meaning from the language. == is still useful in the presence of .equals.
Also, if == is implemented automatically in C#, how do you specify what fields to compare and how to compare them? If it's done by comparing all fields recursively, that seems like a very limited way of doing things and in many cases it would be wrong.
String is an object. It has a charAt method. List is an object. It has an .add method. It's consistent to call the method, even if it means writing 3 more letters. When it comes time to debug that code you'll be glad that you know exactly what it does.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.337s.
(Used 8 db queries)

Seriously, if the existence of overloadable operators is what tips you over to a new language, good luck to you! I hope it is the only mistake in your life.