5 ms·
> Nothing I'm aware of comes close to Java in this, C#. No Type Erasure. More powerful reflection with less code. Not to mention the unbelievable power of Ros
by StaticRedux 8y ago
> Nothing I'm aware of comes close to Java in this,
C#. No Type Erasure. More powerful reflection with less code. Not to mention the unbelievable power of Roslyn and being able to programmatically generate code with little effort.
If you love Java reflection, your mind will be blown by C#'s.
- thermodynthrway 8y agoI came from the C# world :). And yes, it's even more powerful, plus reified generics. The huge problem is that it's not that much better than Java which has ~50X more open source software written for it. The day MS makes a bytecode transpiler so I can use my Java libraries in C# I'll never touch Java again. The languages are so similar I have no idea why they haven't done it yet
- 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.
- guitarbill 8y agoIt's weird, I started in C# but haven't touched anything Microsoft for roughly 10 years. That's how long they've been asleep, maybe longer. I would have killed for official cross-platform C#, if only for a decent UI toolkit (Mono was too bigger pain), and I'm sure C# would have significantly dented the popularity of e.g. Python. Instead C# never outgrew Windows, while many developers and companies did. Meanwhile, Java has kept evolving and taking chances, so much so that Java 8+ is pleasant enough. Only now has Microsoft realized the error, but way too late.
- thermodynthrway 8y agoIt's a damn shame really. MS killed the golden goose by tryiing to squeeze too much money out of it years ago. C# is an excellent langauge, the design and type system are just incredible. But they missed the open source boat by about a decade and it's yet to be seen if their attempt to rally is too late
- RangerScience 8y agoIt's distinctly possible that Unity3D will "rescue" this aspect if C#, although from what I saw of the community it's not there yet. Probably the lack of a good package / dependency manager - oh, and the lack of up-to-date C# support (last I checked you were stuck way back with 3.5). Yadda yadda, if I wanted to "fix" the lack of an open source community in C#, I'd start with the Unity3D community.
- kamac 8y agoIn the latest Unity version (2018) you have access to C# 6 (stable) and .NET 4.6.
- UnpossibleJim 8y agoThe problem with that is, there are now open source game engines coming on the scene that are promising (in the long run, and yes it's a BIG maybe) to upset Unity's stranglehold, that support Python and in the future C# to lure away Unity devs. I'm speaking of Godot. I'm not sure how successful they'll truly be but I, for one, am hoping they bring a solid rivalry. Python as a scripting language makes sense, in this arena, anyways, as it's the scripting language for Blender. A single scripting language for 3D software and game engine in a game studio just makes sense.
- jcelerier 8y ago> The languages are so similar I have no idea why they haven't done it yet the languages are so similar because microsoft started with J++ and got a lawsuit from Sun (https://en.wikipedia.org/wiki/Visual_J%2B%2B https://en.wikipedia.org/wiki/Visual_J%2B%2B).
- pjmlp 8y agoI guess you haven't been around since the beginning of .NET and never heard of J# or IKVM. https://www.codeproject.com/articles/1440/introduction-to-visual-j-net https://www.codeproject.com/articles/1440/introduction-to-vi... https://www.microsoft.com/en-us/download/details.aspx?id=4712 https://www.microsoft.com/en-us/download/details.aspx?id=471... https://www.ikvm.net/ https://www.ikvm.net/
- jsiepkes 8y agohttps://twitter.com/dibblego/status/419232648674828288?s=19 https://twitter.com/dibblego/status/419232648674828288?s=19 > It's funny when Java users complain about type erasure, which is the only thing Java got right, while ignoring all the things it got wrong.