Ask HN: How much do you love C#?
Do you consider porting your Ruby,PHP,Python code running on linux machine into C# in near future?
Do you consider porting your Ruby,PHP,Python code running on linux machine into C# in near future?
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.
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!
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.
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.
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.
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).
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).
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#.
I find it really annoying that C# enums cannot have constructors and variables.
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.
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/. Either you end up with it being ~3x as verbose (if not more), or you lose the compile-time benefits, or both.
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.