10 ms·
I have read a lot of lang. wars and complaints about programming languages... but C# is one of the only languages that I can't remember reading any complaints a
by Dewie 13y ago
I have read a lot of lang. wars and complaints about programming languages... but C# is one of the only languages that I can't remember reading any complaints about. None.
I must conclude, by the usual Stroustrup quote, that no one uses C#. (yes this is tongue in cheek)
- egeozcan 13y agoWell, I use it =) C# is a language with a somewhat limited market ("Enterprise" applications running on Windows Servers, and yes, I know about Mono). And in this market, a very strict subset of C# (see: Java) is happily used. I know a lot of people who refrain from using even lambdas and implicit typing, let alone the other "fringe functional stuff", because "they make things complicated".
- jagawhowho 13y agoYou're not giving mono the credit it's due.
- egeozcan 13y agoI think Mono is great. It's just not a big market but of course it has great potential.
- V-2 13y agoC# is a language with a somewhat limited market ("Enterprise" applications running on Windows Servers, and yes, I know about Mono) One would think that Windows Phone - fastest growing smartphone OS - would go before Mono... geez, I make a living out of desktop C# apps (WPF). Not solely, but on a daily basis.
- smilliken 13y agoFastest growing is easier to achieve when you have low market share. Mono is significantly more important for the future of C# than Windows Phone.
- Danieru 13y agoYou can make it even easier by pretending old versions of your mobile OS don't count. Or at least it appears you're allowed to do this if you left all your prior mobile users high & dry after promising them upgrades, twice.
- V-2 13y ago"Easier" doesn't mean easy - many players to the table, we are yet to see whether Tizen or Firefox OS manage to pull that easy feat. What makes you think Mono plays (or is about to play) such a pivotal role?
- Ramp_ 13y agoI would be interested to know what these apps are? Who buys them? Where do you sell them? I never found a decent place to sell WPF desktop apps.
- nawitus 13y agoC# is a great language, in fact, I believe it's the best "general language", if there ever was one. The only real problem C# has is it's bad support of non-Windows platforms. As a language, it's excellent.
- miguelrochefort 13y agoXamarin
- yachtintransit 13y agoahh no good! C# + X-Platform = #Remarkable
- viraptor 13y agoIt's in other places too. It's just hiding itself very well. For example Unity and the games that are based on it: http://en.wikipedia.org/wiki/List_of_Unity_Engine_games http://en.wikipedia.org/wiki/List_of_Unity_Engine_games
- rjbwork 13y agoI've actually worked at 2 startups using C# and been contacted by 2 others in the last year trying to poach talent. C# is popular in many contexts.
- EnderMB 13y agoThe same goes for me! My first job was at a startup that used ASP.NET with C# (with PHP for micro-sites). From there, I've worked at agencies where I've built both large sites and small sites using ASP.NET and C#. The whole notion of .NET only being suitable for enterprise development is bullshit.
- JackMorgan 13y agoIt's not that it is only ever used for enterprise, just that it seems to be mostly used for enterprise. Think of the licensing costs for visual studio, sqlserver and windows server. Sure there is the Bizspark, but it runs out, and I think most founders would be squeamish with the potential business-technical debt that would represent. At least right now, MS is still seen (although less lately) like the Big Bad, so giving them money to use what you can get for free or near-free elsewhere seems uncool and like bad business sense. I suspect too from my own extremely limited sample size that .NET developers make more money on average than the average of the other languages, so that is also a liability when looking for talent when you have limited cash.
- V-2 13y agoI worked professionally on VS Express for quite a while. Yes it's less convenient, but it can be done. Still a better IDE than (say) NetBeans. I know it's apples and oranges, but I'm speaking about an overall impression.
- JackMorgan 13y agoYou should check out Intellij. http://www.jetbrains.com/idea/ http://www.jetbrains.com/idea/ I think its free version is still better than most paid VS editions. The $500 edition is the best IDE I've seen. And it supports basically every language but the three .NET languages.
- blar 13y agoThat really cracks me up! I work in C# probably 80% of the year (python and shudder vbscript make up the remainder) and I use lambda statements, implicit typing, and anonymous functions almost every day. The Linq IEnumerable<> extensions are also pretty well indispensable for me. My biggest complaint with C# is the limitations imposed by the static typing system: anonymous functions can't be generic, so you're forced to either declare delegates or explicitly declare each of your anon signatures; and KeyValuePair<> and Tuple<> both force you into sometimes excruciatingly, comically long object declarations, eg Tuple<string, IEnumerable<string>, IEnumerable<KeyValuePair<string, bool>> I've come to a point where I can comfortably write functional code in the language (though I should stress that I don't write "pure" functional code; I don't fall into the camp that abhors side effects in all scenarios). Day to day, it really is a fine language to work in, notwithstanding a few warts. In all honesty though, I'd rather be working in Python or a LISP most of the time
- JackMorgan 13y agoFor me, LINQ was definitely a "gateway feature" to the lisp world. If you still use C# at work, I strongly suggest checking out F#: https://news.ycombinator.com/item?id=7048522 https://news.ycombinator.com/item?id=7048522
- TillE 13y agoIt's a little bit too verbose, it doesn't have quite the flexibility or metaprogramming ability of a language like Python. But in general it's a very solid choice. You can even get around a lot of the inefficiency of GC by careful usage of structs.
- EpicEng 13y agoOf course it's more verbose than a dynamically typed language. Silly comparison.
- pionar 13y agoWith the rise of Roslyn[0], your second argument is kinda void (metaprogramming) I never got the verbosity argument. Verbosity comes down to the person using the language. With C#, you can be as verbose as you want to. Do you have any examples? What kind of inefficiency are you speaking of? the CLR's GC is one of, if not the, most efficient around. [0] http://msdn.microsoft.com/en-gb/roslyn http://msdn.microsoft.com/en-gb/roslyn
- darklajid 13y agoSpeaking as a C# developer: I do consider C# more verbose than the languages I love to look at. Think 'SelectMany', 'FirstOrDefault' and similar constructs - even if you write functional C# as much as possible, it still .. is verbose. If compared to F#, Clojure for example. I don't think that's an issue, mostly, but that I do agree with the notion that C# is 'verbose'.
- Touche 13y ago> Do you have any examples? Sure, write a self-executing function in C#.
- paulmcpazzi 13y ago((Action)(() => Console.WriteLine("Hello")))(); or new Action(() => Console.WriteLine("Hello"))(); Yeah, it's verbose because you have to cast the lambda expression before executing it, but honestly I don't know any case where a self executing function can be useful in C#.
- MaulingMonkey 13y agoYou're not hanging around in the right circles then, I hear complaints about C# all the time ;). While there's plenty of limitations and frustrations you can run into with C#, I've generally felt they were largely due to intentional tradeoffs I can understand, and fail to know a better alternative to. This makes me significantly less ranty about it, in contrast to my other daily bread and butter of C++. Even if I felt both were as limiting as each other, I'd be ranting about the latter significantly more -- simply out of a sense that "it shouldn't have to be this way".
- eldavido 13y agoAm currently reading "Thinking Fast and Slow" by Kahneman, this is a perfect example of a base-rate fallacy (something addressed in the book). Absent any other evidence, one should assume the amount of complaining a language would get is about proportional to how widely it's used. So the lack of complaining (asserted by the parent) about C# might be as much a reflection on how widely it's used, than on the language itself.
- delluminatus 13y agoThere is other evidence, though. For instance, C# is currently #5 on the TIOBE programming index [0]. [0]: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index....
- MaulingMonkey 13y ago> Am currently reading "Thinking Fast and Slow" by Kahneman, this is a perfect example of a base-rate fallacy (something addressed in the book). I disagree that Dewie's individual experience constitutes a "base-rate". If you're referring to something else as a "base-rate", you'll have to spell it our more clearly for me, as I'm having difficulty seeing how to apply it validly here. > Absent any other evidence, one should assume the amount of complaining a language would get is about proportional to how widely it's used. That's reasonable, and my own experiences and anecdotes don't turn out to be capital D Data. However, neither are Dewie's experiences and anecdotes. And what I would argue isn't reasonable is assuming the amount of complaining that one individual developer hears about a language we get is about proportional to how widely it's used. The data set is far too small to extrapolate that far. My own experience is that the amount of complaining about a language I hear about varies wildly by what my peers in my communities happen to be using at the time. I went years without hearing any complaints about PHP... and then someone gets employed writing it and it spikes up to the language I hear the most complaints about. I'd be very absurd to assume that PHP went from not used very widely at all to the most used language in that same timeframe! While I cast a wide net, my time is finite and I pay more attention to some communities than others, quite understandably biasing what I hear significantly. > So the lack of complaining (asserted by the parent) about C# might be as much a reflection on how widely it's used, than on the language itself. Granted, but "might be" is a far cry from "is" or "should be assumed to be". Indeed, I wouldn't suggest that "C# might generally be less rant-inducing" to be worthy of assuming either. Dewie "might be" not hanging around .NET devs, but even that's a terribly poor assumption -- I know plenty of devs who don't complain about languages I consider absolutely terrible.
- bsamuels 13y ago>C# is one of the only languages that I can't remember reading any complaints about I've been using C# for about 3 years now. A year or two into using it I thought I was developing fanboy syndrome so I started a list of all of the dumb quirks and pitfalls the language has. Last time I checked, there were only 3 or 4 items on the list compared my python/c++/java lists which have 1-2 orders of magnitude more quirks. C# really is a solid language, it's just a terrible shame it had to have the Microsoft label attached to it.
- CmonDev 13y agoEvery good thing has some sort of label attached to it (look at Android now)...
- insidenorm 13y agoIt's sad how C# is put on a pedestal, since it has plenty of obvious critical flaws, see links below for a list and this is just the tip of the iceberg. http://hestia.typepad.com/flatlander/2012/01/action-func-void-and-unit.html http://hestia.typepad.com/flatlander/2012/01/action-func-voi... http://trelford.com/blog/post/LighterCSharp.aspx http://trelford.com/blog/post/LighterCSharp.aspx http://stackoverflow.com/questions/411906/c-sharp-net-design-flaws http://stackoverflow.com/questions/411906/c-sharp-net-design... http://joeduffyblog.com/2010/06/27/on-partiallyconstructed-objects http://joeduffyblog.com/2010/06/27/on-partiallyconstructed-o... http://blogs.msdn.com/b/dsyme/archive/2013/03/25/quote-of-the-week-quot-what-can-c-do-that-f-cannot-quot.aspx http://blogs.msdn.com/b/dsyme/archive/2013/03/25/quote-of-th...
- mcgwiz 13y agoWhitespace insensitivity and inability to return void in generic contexts are "critical flaws"? Anyway, no one's saying C# is flawless. Personally, I would love the ability to declare immutable graph references.
- V-2 13y agohttp://hestia.typepad.com/flatlander/2012/01/action-func-void-and-unit.html http://hestia.typepad.com/flatlander/2012/01/action-func-voi... I fail to see how it is an "obvious critical flaw" :) You have to create a separate overload that takes an Action instead of a Func, and has an identical implementation except for omitting the return keyword. Granted, that’s not much work for a simple helper like the above, but what if it were more complicated? No, it's simply not true that you need "an identical implementation except for omitting the return keyword"... Eg. this would do the trick without repeating the implementation: http://pastie.org/8628864 http://pastie.org/8628864 Just two one-line overloads as entry points.
- raphaelj 13y agoYour solution is at least as ugly as the one mentioned in the article. The problem is that void can't be used as a regular type identifier. In a lot of langages (like Python, Haskell, F#, ...) there is a regular type for void. This type is often implemented as such : sealed struct Void { } Then you can define Action<...> just as Func<Void, ...>. As the compiler is smart enough to see there is only one kind of Void value, it can be entierly removed from the generated code and thus doesn't make your code slower.
- frou_dh 13y agoAn obvious complaint is that code like the OP's won't even run because it isn't pointlessly wrapped in a class ("class MyProgram").
- jdc0589 13y agoI have 1. You can't do generic constructors for custom attributes. That's a pretty small complaint though...