6 ms·
They want to prevent another half-baked implementation of a feature like they did with generics. C# is much faster and has much more features, but because of t
by dtech 9y ago
They want to prevent another half-baked implementation of a feature like they did with generics.
C# is much faster and has much more features, but because of that it's also a bit of a mess sometimes. For example regarding closures/anonymous functions it has delegates, lambdas and anonymous (inner) classes which all have overlap but aren't fully the same.
Java only has anonymous inner classes, and a convenient syntax and good support for anonymous inner classes with only 1 method (which they call lamdbas)
- pjmlp 9y agoLambdas are a bit more than that, because on standard JVMs they are implemented with specific bytecodes (via an invokedynamic specialization). The only variant of Java that desugars lambas into anonymous inner classes is Android, because Google.