Hacker News new | ask | show | jobs
by kuschku 3504 days ago
There’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#.

4 comments

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

Every 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.
IMO 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.

I think using goto when breaking multiple loops is useful.At least you know where the next line will be.
There are reasonable applications for goto. But I think there are more reasonable applications for operator overloading. (like Complex, BigInteger, or dimensional types)
Lambda'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.

> Operator overloading is probably the worst feature ever invented

A seemingly common sentiment, but one rarely backed by any meaningful data.