4 ms·
C# and java are very similar except C# has a bunch of extra features. Instead of creating anonymous classes and overriding methods you use event handlers. Plus
by samfisher83 10y ago
C# and java are very similar except C# has a bunch of extra features. Instead of creating anonymous classes and overriding methods you use event handlers. Plus you have linq,lambdas, operator overloading etc.
- kuschku 10y agoThere’s also the Stream API and lambdas in Java. Operator overloading is probably the worst feature ever invented, same with Class Extensions, reducing readability of code. And with a switch to C# Google would neglect the Java ecosystem on Android, requiring us app devs to rewrite everything again. I’m not sure there’s an upside to switching to C#.
- recursive 10y agoIMO operator overloading is less bad than goto. (C# has them both) C# also has yield, async, structs, reflection on generics, and a number of other features.
- samfisher83 10y agoI think using goto when breaking multiple loops is useful.At least you know where the next line will be.
- recursive 10y agoThere are reasonable applications for goto. But I think there are more reasonable applications for operator overloading. (like Complex, BigInteger, or dimensional types)
- jaegerpicker 10y agoLambda's are horrid on Java compared to C# IMO. Class extensions can be fantastic and really enable design elements in elegant ways, any advanced feature could be argued that it reduces readability if used poorly.
- serge2k 10y ago> Operator overloading is probably the worst feature ever invented, same with Class Extensions, reducing readability of code or greatly enhancing it. Depending on how you use it. That's why Java is a language for idiots. I'm not saying everyone who uses it or likes it is an idiot, it's a reasonable language to like. I'm saying it's designed to be usable by idiots. Can't have operator overloading, it might be abused. Can't have unsigned types, no one ever should use those. etc...
- bitmapbrother 10y agoEvery language is usable by idiots and some are even copied by idiots (C#). The constant security problems we face today were all created by idiots that didn't fully understand the language and the implications of what they were doing.
- naasking 10y ago> Operator overloading is probably the worst feature ever invented A seemingly common sentiment, but one rarely backed by any meaningful data.