4 ms·
Regarding the language itself, what's there to dislike about C#?
by colkassad 13y ago
Regarding the language itself, what's there to dislike about C#?
- swalsh 13y agoIf C# wasn't made by Microsoft, but had a similar toolset and feature set, i would offer the opinion that it would be the top managed language.
- skrebbel 13y agoI don't understand that attitude. First, you can use C# really well without depending on any Microsoft tech. Second, Microsoft standardized the language and made a community promise not to enforce their C#-related patents (like e.g. Oracle did against Google for Java). So, it free, it has full FOSS tooling. What's the problem?
- jamon51 13y agoThe word "Microsoft" tends to evoke emotion, highly irrational in many cases, despite any actual facts present. With that said, I know a lot of devs who hate almost everything about MS that actually do like C#.
- GhotiFish 13y agoIt's not an irrational behaviour to say "I don't know where you're holding the knife this time, but it's not worth the effort to find out"
- niuzeta 13y agothe nuanced microsoft brand
- pjmlp 13y agoThe standard only covers up to C# 3.0, if I am not mistaken.
- uxp 13y ago> First, you can use C# really well without depending on any Microsoft tech. As someone who is coming from a very FOSS world and trying to learn C#, I have to counter that no, C# does not have a really good open source ecosystem. Mono works, MonoStudio is pretty decent, but it lacks all of Windows, and there isn't much to target that is not Windows if you are doing anything that is not a webapp. Objective-C also has a pretty decent open source toolkit in GCC, but a toolkit that lacks Cocoa is like trying to eat dinner but forgetting the food. Mono is a great toolkit, but it's missing 80% of the libraries that makes C# an easy language to use. You've got your forks and spoons, but you've got nothing to eat. Note that I'm not complaining against C#. I'm really liking the language and everything I can do when I'm in a Windows or Windows Phone environment. I'm arguing that C# is not as portable, in practice, as everyone continually claims.
- groovy2shoes 13y agoI started learning F# a few weeks ago and feel the same way. The language is very nice, but so much of the .NET ecosystem is Windows-specific. I've run into a handful of libraries that would be useful, but I cannot use them on my Mac. To be fair, there are quite a few libraries that do work. Furthermore, much of the documentation assumes a Windows environment. Getting a development environment set up around Mono has been possible but challenging. F# and Mono are neat, but .NET has a long way to go before it becomes as cross-platform as Java.
- saosebastiao 13y agoI hate Microsoft, but I love both C# and F# as languages. Unfortunately, I refuse to use them because Microsoft. Mono is a great attempt at making the use of the languages acceptable to me, but unfortunately it is still a second class citizen. It works okay, I guess, but .NET was created from the ground up as Windows infrastructure. The same could be said for Clojure on the JVM...it works great if you are using pure Clojure, but the moment you try to use Java libraries, all of a sudden everything becomes messy and loses its idiomatic nature and all the elegance that goes with it (like, for example, the pervasiveness of mutating methods in Java but the almost religious avoidance of mutability in Clojure).
- dnesteruk 13y agoOh for the love of... it IS a top managed language. Probably the best general-purpose language on the market right now. Not the most widely used, of course, but one of the most enjoyable.
- TillE 13y agoIt lacks some of the syntactic niceties and metaprogramming you get with languages like Python. Otherwise it's quite good for what it is, and my frustration with C# is entirely down to the ongoing failure of Unity Technologies to upgrade the version of Mono included with their game engine. It means I'm stuck with an old version of C# (notably without the dynamic type), watching as quite a few third-party libraries drop support for it.
- kvb 13y agoI like C#, and I think that it's an objectively well-designed language given its designers' priorities. But if you have different priorities, there's plenty to dislike. If you want a scripting language, or a really expressive type system, or raw-metal performance, then C#'s not going to scratch your itch.
- maerF0x0 13y agoIf I didnt have to use the Microsoft Stack, I'd probably make my main language C# . I like the language, but dont want to use IIS, Windows Server et. al. Give me (not mono) C# on linux and my choice of webserver and I'll change teams.
- Gazk 13y agoThere is OWIN for .NET which is the equivalent of Connect / Rack / WSGI. So hopefully in the future it won't be reliant on IIS.
- tomlu 13y agoIt's almost impeccable at what it's trying to do, but I can think of a couple of things: * References are nullable by default (IIRC Hejlsberg himself would do this different if he could) * Its C-derived brace-heavy syntax can make C# code a bit messy-looking and stretch out a bit vertically, especially with the community's preferred brace style
- Locke1689 13y agoReferences are nullable by default (IIRC Hejlsberg himself would do this different if he could) Yeah I think we all would.
- runT1ME 13y agoVariance is messed up, lack of higher kinded types, type inference is pretty awful, no implicit conversion, too much boilerplate for a small method call. sometimes I just want to write: public static String getFirstThree(String s) = s.SubString(3); etc. But, the fact that it has LINQ, good lambda support, and some type inference make it a very good language over all.
- Locke1689 13y agolack of higher kinded types, If you know about kinding, you probably understand that type system design really has to go hand-in-hand with language design. Introducing those kinds of breaking changes now is incredibly difficult, unfortunately. As far as boilerplate goes, though, I can't promise anything but I can say that we hear you and this is something that could get attention in the near future.
- stonemetal 13y agoThe standard library smells of rot much like Java's(how many timers does one standard library need? The multiple incompatible collections classes, and GUI libraries etc). Thanks to the rapid language iteration we have neat code features. Thanks to the rapid language iteration our large, long lived code bases now have language version "sediment layers". Not about the language in particular but other reasons to dislike it. For some reason there is a big NIMS(Not Invented by MS) in the community. People use MS's shoddy add on libraries because they are from MS (Asp.net webforms, EF). The announce, wait 20 min, and kill cycle for some of MS's libraries.