4 ms·
"The huge problem is that it's not that much better than Java" I always see the .net fanboys tout how much better C# is than Java with generics, await/async, e
by wpdev_63 8y ago
"The huge problem is that it's not that much better than Java"
I always see the .net fanboys tout how much better C# is than Java with generics, await/async, etc. but at the end of the day it's not that much better when you can achieve the same thing in Java with better open source support and across oses.
I know there's .net core now but I am not going near it until it matures.
- thermodynthrway 8y agoI miss all that from C#, some of it a lot. But Java has a community so large that they've basically hacked these things into Java anyways. LINQ -> streams, QueryDSL, RxJava, JOOQ etc Async/await -> Comsat/Quasar The type system is lightyears better in C# but it was rare that I needed those features. Usually you can hack around the limitations and end up with something (slightly cruftier) that does the same thing in Java. Mockito, Retrofit, and RxJava are good examples of hacking about the type system until you have something good enough. That said, there are definitely times I still miss C#'s stellar type system. Easily the best of any language I've touched besides maybe Typescript (which is designed by the same guy)
- mercurial 8y agoThere is nothing particularly outstanding about C#'s type system. It has reified generics and some basic type constraints, but so what? No option type, no ADTs, no pattern matching... Working with Typescript at the same time, I feel crippled every time I need to do something in C#. Not that Typescript is perfact, but its type system (especially with `strict`) is considerably more sophisticated.
- Latty 8y agoIt has basic pattern matching now, nullable is the option type, which is being extended to reference types in the next version. It's no Scala, but it's getting there.
- wpdev_63 8y agoIf you really care about all those features then you would just use kotlin. It works almost seamlessly with Java and has the best ergonomics of any language I have ever used. All those festures are in kotlin and then some.