Hacker News new | past | comments | ask | show | jobs | submit login

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.



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)


Lambdas 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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: