3 ms·
I emphasised the “slowly” because c# has the reputation of being “a bad copy of Java”, while apparently the opposite is true given how long it took Java to copy
by tigershark 9y ago
I emphasised the “slowly” because c# has the reputation of being “a bad copy of Java”, while apparently the opposite is true given how long it took Java to copy closures and to produce a bad copy of LINQ.
- dtech 9y agoThey 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.