|
|
|
|
|
by RivieraKid
3504 days ago
|
|
> I would say "it's simply superior in every imaginable metric other than cross-platform implementations of the compiler/VM" but that's just my opinion. Not by a big margin. Java 8 has lambda functions, which used to be the most painful aspect of the language for me. |
|
For example, in Java, you have this: http://docs.oracle.com/javase/8/docs/api/?java/util/function...
Note all the permutations. This is necessary, because there's no way to define a generic interface that would have acceptable perf, due to boxing. So you end up defining separate types for things like int->int, int->int->int, long->long etc. And then if you need e.g. bool->int, well, that's just too bad.
Whereas in C#, you just have Func<...> and Action<...>, and they work with all permutations of all primitive and user-defined types.