Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Re:Mono needs a similar testsuite. (Score 1) 271

C# has yield iterators, i.e. real iterators like in Python. Try writing an iterator in Java for a tree structure. You pretty much have to think about breaking it into a state machine. In a language that has real support for iterators it's as simple as writing your standard-issue traversal function.
Unless you are picking a bad example, I still don't see any purpose to this.

Of course in Java you can do that contrived example as TreeSet.iterator( ), so it really doesn't take any significant code using the basic libraries in the language.

Your type inference is really just shorthand, I don't really see that as an advantage in any significant way either.

C# and Java are now both heavily plagiarized from each other. If you are explicitly coding for Windows, C# has the advantage that it mimics the underlying Windows API. If your code ever has to run anywhere else, Java is probably the better choice. Unfortunately I think Java picked up a few of the bad ideas from C# in the last couple of revisions, but that's just my opinion.

Slashdot Top Deals

"By the time they had diminished from 50 to 8, the other dwarves began to suspect "Hungry." -- a Larson cartoon

Working...