4 ms·
Or have both. What's in Java 8 that isn't in C#? And last I checked you couldn't use Java 8 fully on Android (please correct me if I'm wrong).
by kentosi 10y ago
Or have both. What's in Java 8 that isn't in C#?
And last I checked you couldn't use Java 8 fully on Android (please correct me if I'm wrong).
- johncolanduoni 10y agoYou are painfully correct...
- daxfohl 10y agoAnonymous classes are the big thing I miss. (Yes C# has a feature called "anonymous classes" as well, but it's completely different).
- TheCoelacanth 10y agoWhat do you still use those for? I can't remember the last time I saw an anonymous class used in a way that isn't superseded by lambdas.
- daxfohl 10y agoYeah, I was thinking about that when I wrote the comment. They were most useful for `Observable` objects for event handling in swing; you don't really need that with C# events. There are still uses though. Lambdas are the future, but there are lots of OO-first libraries that are still quite popular. It'd be nice to create e.g. `new Newtonsoft.JsonConverter() { ReadJson() {...} WriteJson() {...}}` etc on the fly sometimes without needing separate classes. It's possible in F# though, so nothing dotnet specific is preventing it.
- jdmichal 10y agoI use them all the time for defining singleton implementations. public static final MyInterface SINGLETON = new MyInterface() { ... }
- adzm 10y agoIf only we could run IL on the JVM
- xorxornop 10y agoValue types. Reified generics.
- ckarmann 10y agoJava enums are the one thing that I miss in other languages.