3 ms·
Compare that to how you would do it in C# (note that's not how you do comparisons specifically, this is just to demonstrate the C# lambda syntax): list.Sort(
by DrJokepu 16y ago
Compare that to how you would do it in C# (note that's not how you do comparisons specifically, this is just to demonstrate the C# lambda syntax):
list.Sort((i1, i2) => i1.CompareTo(i2));
Isn't that an awful lot more readable / usable?
- bfung 16y agoYes, actually, while I was editing, I was going to mention C# delegates and new lambdas (I've been using C# 2.0, haven't upgraded yet). In my opinion, C# has been the better Java for a while; I think they should just copy C# stuff since it's already been proven to work and has some nice properties/syntax. It's not like C# didn't copy from Java in the earlier days...