Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Someone can as easily find something in Java 1.5 that C# still doesn't have.

Like what?



checked exceptions :), sorry just kidding.

mainly wildcards, you can design an interface which is covariant and contravariant, and real interference when calling a generic method.


The lack of wildcard types in C# consistently bothers me when I use it.


It looks to me like C# supports everything from http://docs.oracle.com/javase/tutorial/extra/generics/wildca... using generic type constraints: http://msdn.microsoft.com/en-us/library/bb384067.aspx

What am I missing?


They added Covariance and Contravariance of generic type parameters in 4. http://msdn.microsoft.com/en-us/library/dd799517%28v=vs.110%...


static imports ?


You could add an extension method to object, if you want the same effect.

(Although: A workaround for java's bizarre stance that no function can exist without an object doesn't really strike me as a "feature". [Granted: this criticism is equally true of C#])


It's in C# 6 :)




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

Search: