KBD

Keith Devens .com

Sunday, October 12, 2008 Flag waving
It's such a fine line between stupid and clever. – David St. Hubbins (This is Spinal Tap)
← Ping-o-MaticWar against "terrorism" or Islamic fascism? →

Daily link icon Sunday, June 13, 2004

Java sucks

Java sucks. For a language that's supposed to be clean, it has some real warts. I found out recently that C# has operator overloading. I'm rooting for the Mono project much more since then.

← Ping-o-MaticWar against "terrorism" or Islamic fascism? →

Comments XML gif

Mats Henricson (http://www.henricson.se/mats) wrote:

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.

∴ Mats Henricson | 14-Jun-2004 6:02pm est | http://www.henricson.se/mats | #4773

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];

∴ Adam Vandenberg | 14-Jun-2004 6:37pm est | http://flangy.com/ | #4777

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?)

Keith | 14-Jun-2004 7:06pm est | http://keithdevens.com/ | #4778

hisham mk wrote:

political point: what about vendor lock-in? the fact that ximian & you are under the courtesy of microsoft.

∴ hisham mk | 14-Jun-2004 9:48pm est | #4783

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?

Keith | 15-Jun-2004 12:10am est | http://keithdevens.com/ | #4789

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 ?

∴ ME | 15-Jun-2004 6:03am est | #4793

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 | 15-Jun-2004 8:51pm est | http://keithdevens.com/ | #4798

Keith Gaughan (http://talideon.com/) wrote:

To paraphrase Stroustrup: Any language that people don't think sucks is one that nobody uses. Smiley

∴ Keith Gaughan | 16-Jun-2004 3:41pm est | http://talideon.com/ | #4807

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.

∴ Mike | 17-Sep-2004 5:54pm est | #5609

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.

Keith | 17-Sep-2004 7:34pm est | http://keithdevens.com/ | #5610

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

∴ Java Sucks | 13-Aug-2005 1:24am est | http://javasucks.blogspot.com | #8105

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:

Java vs. C#

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".

∴ DJ Hannibal | 12-Dec-2005 4:56pm est | #8834

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. Smiley winking

∴ Elling | 13-Dec-2005 5:31pm est | #8839

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.

∴ DJ Hannibal | 13-Dec-2005 7:55pm est | #8845

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

∴ alex2308 | 13-Jan-2006 12:38pm est | #8995

ahmoy wrote:

"youll need a supercomputer with 16gb ram to run hello world on it."??? how about c# then?

∴ ahmoy | 3-Apr-2006 1:59am est | #9373

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.

∴ 208.125.4.90 | 14-Dec-2006 11:21am est | #9849

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

October 2008
SunMonTueWedThuFriSat
 1234
567891011
12131415161718
19202122232425
262728293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 8 posts

Recent comments XML

new⇒URL design

http://groups.google.com/group/cool​ndex/web/asian-girl-sucking-to-blac​k-man...

derek: Oct 12, 12:13pm

I hate PHP

Elliot Anderson,

Dude!! You the​man! The reverse replacement for​array_u...

Alex Ndungu: Oct 11, 1:35am

Call a function from a string in Python

?!code:
some_object.__getattribute​__('method_name')()
?!/code

is​the s...

Patrick Corcoran: Oct 8, 3:53pm

Spider solitaire

I have won 185 games of Spider​Solitaire at the "Difficult" level.​ What is...

75.179.28.113: Oct 8, 12:42pm

Sed one-liners

Hi.

I wanted to let you know​that I wrote an article "Famous Sed​One-Lin...

Peteris Krumins: Oct 8, 3:05am

Timesheet Calculator

Hadn't seen it before now, but my​company already uses a time​tracking prog...

Keith: Oct 7, 10:44am

Girls, please don't get breast implants

Hey everyone, 

I am new to this​blog and I have enjoyed reading all​your...

Sarah.M.: Oct 6, 9:45am

Generated in about 0.337s.

(Used 8 db queries)

mobile phone