4 ms·
Ask HN: How much do you love C#?
C# is great language, additionally, core is open source now, so how much do you enjoy programming in C#?
Do you consider porting your Ruby,PHP,Python code running on linux machine into C# in near future?
- honest_joe 11y agoI would consider learning C# especially because of the Unity. The other things are just the side benefit.
- geoffsmith 11y agoI code C# for money not love. It's a mongrel language.
- bbcbasic 11y ago> It's a mongrel language. Care to expand? To me mongrel means 'not thoroughbred' or in other words a mix of things. Which I guess it is, but no worse than Java, Python, JS in that regard.
- runjake 11y agoI love C#/.net/ASP.net (I enjoy it, actually) but it's not ready for prime time on non-Windows platforms at all. And I'm unsure .net will ever be nothing more than the proverbial "red-headed stepchild" on non-Windows platforms, we'll see.
- goalieca 11y agoI coded c# in my last job. We used mvvm and wpf and msbuild and all that other lovely stuff. I was productive if you counted lines of code. It's a terrible language for actually getting things done properly though. I first coded a winforms app using 1.0. It was very nice experience. The OOPfuscated wpf api with its confused mvvm anti-pattern made my life a living hell of high coupling and constant refactoring. Performance and debugging were terrible because of all the dispatching. The rect class alone has 200 members and is the 6th or so down on the inheritance chain. Making your own widgets was a very messy and tricky task. .net also felt like a second class citizen on its native windows (8.1 was last time I touched it). Had to fall back on win32, incomplete comparability layers, deprecated apis, weekend hobby projects that are incomplete.. Yuck!
- dmarlow 11y agoI love C#. Use it for all programming I do.
- facorreia 11y agoI worked with C# for years. I think it's a great language. I like its type safety and its advanced features (dynamic types, lambdas, async). I got tired of how Microsoft managed the whole .NET ecosystem, uncertainty and changes regarding data access and web services libraries, etc. Currently I'm working with Scala. It can be compared to C#, and some helpful features like immutability and case classes. I also like the JVM ecosystem (e.g. libraries, Linux compatibility).
- partisan 11y agoI respect C# and haven't found anything to match it yet. I did actually say out loud, "I love C#!" the other day. Lambdas, linq, generics, reflection and runtime type loading all are top notch with very few sacrifices. When it runs well on Linux, it will probably be something we take advantage of and run our applications there. We probably could do so now, but time is short and figuring out cross platform quirks is not something we can give a lot of time to.
- Genbox 11y agoI love the language itself. Some C# 5 and 6 features still bug the hell out of me, but it fine as long as they are optional. The tools (Visual Studio) is the best editor out there without question and makes coding C# a breeze. That being said, I've always hated the choices Microsoft made about the .NET framework; closed source, license, installation, dependency and all that. Thankfully, that seems to change for the better now with .NET core, which I really hope takes the language to the next level. .NET native is also a MUST in my world. Give me C#, open source portable .NET, .NET native and I'm convinced C# (and .NET) is the best there is.
- miguelrochefort 11y agoI love the ecosystem (Windows, Nuget, Visual Studio) and the fact that it runs on multiple platforms (iOS, Android, Linux, Mac, Windows). I think it could be slightly less verbose. F# is a nice improvement, but it's not perfect either. Haskell is closer to the syntax I like in a language.
- bbcbasic 11y agoI work with C# professionally and prefer it to Ruby, PHP and Python simply because it has a superior type system, which allows you to have more checks at compile time and in my opinion that means fewer bugs. It is also preferable to Java in terms of language features. In addition you have code contracts that is a pretty damn good bandaid to the 'allowing nulls' legacy C# has inherited from it's parent languages. Having said this if I were on linux I'd prefer to use Haskell as it has a superior type system that blows C# out of the water. For example monads cannot be worked with generically in C# through the type system as there are no type variables / type constuctors to allow this.
- TheLoneWolfling 11y agoI like C#. There are two reasons why I don't use it more. First, the whole .NET thing (Or rather, the lack of cross-platform compatibility). Yes, Mono is pretty good, but nowhere near perfect. (Although note that this is changing). And second, enums are hideous in C#. One of the few things Java does better than C#.
- nvivo 11y agoThat's funny. Enums are one of the things I believe C# got better than java.
- TheLoneWolfling 11y agoElaborate? I find it really annoying that C# enums cannot have constructors and variables.
- nvivo 11y agoThat's exactly the point. Enums are just enumerations, they're not classes. It makes little sense in my opinion to add constructors and variables to enums. You can do exactly what java calls enums with classes in C#, which in my view are better suited to having constructors and fields. But I agree it's all preferences.
- TheLoneWolfling 11y ago> You can do exactly what java calls enums with classes in C# No you cannot. You lose the single biggest benefit of enumerations - namely compile-time checking. (For instance: warning when a switch statement does not cover all cases.) Try to do this in C#, and you'll see what I mean: http://snipplr.com/view/42422/the-planet-enum-example/ http://snipplr.com/view/42422/the-planet-enum-example/. Either you end up with it being ~3x as verbose (if not more), or you lose the compile-time benefits, or both.
- tonyedgecombe 11y agoI love it, moving from C++ to C# has been great for my productivity. Not just the language but the tooling around it as well. Not sure I could use it for cross platform yet, my software is a desktop/service combination and I don't think WinForms on Mono on Linux is good enough (although I haven't tried this so I may be wrong).