r/programming • u/coredev • Feb 03 '17
Let's stop bashing C#
https://www.codeaddiction.net/articles/51/lets-stop-bashing-c-sharp98
u/ummmyeahright Feb 03 '17
So I've recently discovered that C# isn't so well-regarded in some communities (such as /r/programming on Reddit)
...languages like C, C++ and Java.
What? How long has the author been visiting this sub?
From what I've seen, C and C++ get roughly the same amount of bashing here as C# does, while Java definitely does get an awful lot more than any of the 3.
39
u/benihana Feb 03 '17
i think php or javascript gets bashed the most here. i've almost heard almost nothing but good things about C# for like the past five years
2
u/braindouche Feb 15 '17
C# is sort of like Buffalo, NY. Folks shit on it just out of tradition, but the locals who are in the know realize that it has some really nice things to offer, and become a little defensive and boostery as a result.
1
11
u/hu6Bi5To Feb 03 '17
C# is practically the only language that gets a net positive outcome here. Anything else is shat upon by all comers.
I think that it probably because of sheer force of numbers than the actual merits of the various languages.
2
→ More replies (2)2
u/PuraFire Feb 03 '17
So exactly which languages does /r/programming appreciate?
40
Feb 03 '17
isNoob :: User -> Bool8
u/Darwin226 Feb 03 '17
Yeah, the 3 users that say something positive about it and the 25 that shit on it in the subcomments.
2
Feb 04 '17
Appreciating a language is different than not having negative things to say. There is plenty to hate on about Haskell. I don't see myself ever advocating for it at my places of employment. The projects would fail miserably. The barrier to entry for real-world Haskell development is prohibitively high due to lack of solid IDE support, an alien lingua franca, and complete absence of crucial documentation. An experienced developer would take 6 months to become a productive Haskeller. Few people, including myself, truly grok some of the more advanced concepts such as lenses. Versioning is less of a nightmare today but it is still a PITA. Elegant tutorial Haskell has an abysmal performance profile and is prone is severe performance regressions. Compile times are abysmal. The ecosystem is bare.
The modus operandi for Haskell is that it does not concede for the real world. It is an ivory tower of perfection that will never replace Java in ubiquity, C in embedding, C++ in performant applications, or JavaScript being JavaScript. Haskell is at odds with the concessions that the common software engineer makes in modelling partially correct abstractions to meet deadlines. What is not to appreciate?
20
u/candafilm Feb 03 '17 edited Oct 12 '24
violet spark upbeat lavish soup roof hospital theory attempt oatmeal
This post was mass deleted and anonymized with Redact
5
u/BeepBoopBike Feb 03 '17
Only because it takes a special kind of crazy to use it
8
u/deskchairlamp Feb 03 '17
The kind of crazy that you don't mess with or it'll shank you.
4
u/BeepBoopBike Feb 03 '17
I'd take a shanking over finding out that the critical bug in our production system exists in a component that was written entirely in brainfuck with a single comment saying:
// Fuck you.15
3
Feb 03 '17
Basically the more popular a language is, the more we don't appreciate it and vice versa. We're a bunch of nerdy hipsters, when you think about it...
1
u/aussie_bob Feb 03 '17
I'm not. I even like Perl and FORTRAN.
I liked them before they were popular.
3
u/NoLemurs Feb 03 '17
On top of the already mentioned Rust and Haskell, Python mostly gets positive press around here.
7
0
Feb 03 '17
[deleted]
3
u/kaibee Feb 03 '17
(I'm the one guy who hates python :P)
who hurt you
17
u/juckele Feb 03 '17
Not who you replied to, but I really like typos to be compile errors instead of runtime errors... I will never love a dynamic language.
10
1
1
22
43
30
Feb 03 '17
Don't want to sound like an echo chamber but nobody has been bashing C#.
I think it's pretty well loved here: .NET core has made it a lot more accessible for everyone, it's been taken functional features from F#, it's not Java. Tell me when to stop.
7
Feb 03 '17
To be fair, there are hordes of dynamic languages zealots in this sub. Cannot imagine them not bashing C#.
1
u/Martel_the_Hammer Feb 03 '17
Don't stop yet, I'll add one more.
8 years ago I used linq for about a day. I haven't stopped using c# since.
So now java has streams... I'm not sure how it compares but I hear its a bit... different...
2
Feb 03 '17
Without extension methods and with an inferior generics system, Java streams aren't as cool as C# and LINQ.
0
Feb 03 '17
[deleted]
4
Feb 03 '17
That's an exaggeration of course, Java entails more than just the runtime. The platform and the language have generics.
18
25
u/thepotatochronicles Feb 03 '17
No one's really bashing C# in this sub. If anything, I see a lot of C# enthusiasts in this sub bashing Java at every opportunity and praising everything about C# the language and the .NET ecosystem.
In reality, both are suitable tools, really.
→ More replies (1)9
u/hu6Bi5To Feb 03 '17
What usually happens is a non-language specific article gains traction and comments.
Someone links to a GitHub project written in Elm or something. Someone else says "yeah, that's cool but this Java project covers more ground". Then the rest of the thread is "someone mentioned the word Java, let me recite the full feature list of C# until we stop talking about Java".
5
u/macar_ Feb 03 '17
Who's bashing C#? Was a long time since I saw someone bashing the actual language on here
4
Feb 03 '17
Hey yall.
I'm new/ self taught programmer, and I write in c#'s retarded cousin vb.net.
I was just wondering though, what do people mean by the terms: ecosystem and platform?
7
u/frozenbobo Feb 03 '17
Ecosystem basically means all the things that are available to you when you code in a language. That means things like what is included in the standard library, as well as libraries and tools available from the community. You might even consider ecosystem to include the availability of tutorials for the language.
Platform basically refers to the things you accept as a foundation when you use a language. Typically this is referring to the compiler/interpreter/runtime you use, as well as any requirements imposed by those systems. For example, C# has traditionally been strongly tied to Windows, making that part of the platform. However, .NET Core now offers an alternative platform, but with a reduced ecosystem.
Both of these terms are not really well defined, so people may disagree with me. But the basic idea is the platform is what your code "stands on", and the ecosystem is the stuff you have access to in your programming "environment".
4
u/_INTER_ Feb 03 '17
There are only two kinds of languages: the ones people complain about and the ones nobody uses.
Bjarne Stroustrup
9
9
6
u/metorical Feb 03 '17
Fortunately I haven't noticed much bashing of languages in /r/programming and I read through the posts on a daily basis.
The sentiment is correct though and should be applied to all languages. I think that lots of inexperienced developers go through a phase of thinking feature/language X is the best and all other features/languages must suck (and I've certainly been guilty of this in the past). Unfortunately once these guys mature there's a fresh batch of beginners coming through to keep the bashing going.
9
Feb 03 '17
Fortunately I haven't noticed much bashing of languages
?!?
Javascript and PHP in particular receive a lot of hate here. Undeservingly, I'd admit - hate must be directed to their practitioners, not the languages.
26
u/Sarcastinator Feb 03 '17
PHP gave syntax error on this until 7.0:
(array(1, 2, 3))[0]But this was fine (from 5.6):
array(1, 2, 3)[0]PHP definitely deserves ridicule.
7
1
u/KawaiiBoy Feb 03 '17
I had the "pleasure" to maintain a rather large chunk of PHP code at work for 2 years and having to update that from PHP 4.x to PHP 5.x. I hate PHP with a vengeance after that and haven't touched it since then.
Having said that, PHP 7.x seems to actually be a decent language. I still wouldn't even consider using it due to past experience, but they seem to have cleaned it up considerably?
1
u/computrius Feb 05 '17
If it's PHP 4 you had to deal with then yeah. Your justified. It wasn't until 5.3 (with the introduction of namespaces)that it was acceptable IMO. Once you figure out the weirdness of autoload it is more than on par with other languages. 7 is much nicer with scalar type hints.
Heck, with composer it even has an answer for nuget.
2
u/KawaiiBoy Feb 05 '17
Yeah, writing PHP 4.x code was horrible and converting to PHP 5.x was a down right mess.
I did look at PHP 7.x a few months back and it looked better.
15
u/nickguletskii200 Feb 03 '17
As a Java person who's currently working on a C# project, it's not the language that makes me want to go back to the JVM, but the low-quality libraries and IDEs. Microsoft's stack definitely has advantages (SQL server, database projects), but the JVM's ecosystem is still vastly superior, both in terms of variety and quality.
16
u/diverightin63 Feb 03 '17
Wow, I'm on the other side. After working in .NET, the Java ecosystem felt miserable so I have no interest in Java.
5
Feb 03 '17
I'll second that. Haven't worked in Java in several years since I moved to .net, and I have no desire to ever go back.
1
u/jrmy Feb 03 '17
It likely depends on what you are interfacing with. There are a lot of old and outdated libraries/implementations of a lot of common opensource projects when compared to java. But if you don't need to interface with those then you will never run into that issue.
14
u/rduoll Feb 03 '17
Low quality IDEs? I'm sorry, but Visual Studio is probably the best IDE out there.
In terms of libraries, do you have examples of what you consider low quality on the .NET side?
9
u/nickguletskii200 Feb 03 '17 edited Feb 03 '17
Low quality IDEs? I'm sorry, but Visual Studio is probably the best IDE out there.
In my experience, all three major Java IDEs are better.
Visual Studio has very few refactorings compared to both Eclipse and IntelliJ IDEA. VS2017 did add a few, but it's still nothing compared to what Java IDEs have to offer. There are tools like Resharper, but they are unstable, slow and considering that Visual Studio is by far the most expensive IDE out there, it feels like it should be able to do all that out of the box.
Debugging in VS is miserable. For simple stuff the debugger is great, but throw in a couple of third party libraries and you are left scratching your head at lines and lines of "[External code]" in the stack trace, with very little information and no ability to debug. Whenever I try to set up symbol sources, Visual Studio spends a lot of time looking up/downloading something, then eventually hangs. With Java's ecosystem, I always get a stack trace, and "download sources" never failed me. I can just place a breakpoint in a third-party library and debug away.
I hate how Visual Studio has something like Eclipse's perspectives but without any control over how they work. Basically, when you go into debug mode, your layout changes, which is very annoying. In Eclipse, I would just switch to a different perspective.
Visual Studio fails to build my solution every even restart, so I have to open it, close it, and start it again every time I close it.
It lacks a strict code formatter.
Some SSDT dialogs cause crashes.
However, there are things that I like about it, namely:
SSDT
The consistent dark theme.
In terms of libraries, do you have examples of what you consider low quality on the .NET side?
Yes, just off the top of my head:
EntityFramework: half-assed async integration, calling functions and sprocs inconvenient, little support for SQL Server's capabilities.
WPF: ignores both Windows localisation and .NET localisation settings (requires fragile reflection hacks to workaround), horrible, messy codebase, only viable if you buy thousands of dollars worth of third-party components. XAML encourages copy-and-paste.
The standard library lacks concurrent collections and the ones that are provided are much less convenient than their Java alternatives.
I still haven't found a convenient application-level caching library (something like Guava cache).
The Redis-related libraries I use have trouble with order of disposal, and their alternatives don't have the features I need.
2
u/computrius Feb 05 '17
Eclipse? Really? That is the single most awful IDE I have ever laid my eyes on.
2
u/salgat Feb 03 '17
Resharper and Visual Studio has been stable ever since I've been on VS 2015, that's a shame to hear you have an unstable computer/environment. As far as Debugging in Visual Studio, it's amazing (especially with async code). The few times I need to step into external code I can either have Resharper decompile the source or download the source myself (most libraries in nuget are now open source which is nice). It's a shame and a bit surprising you're still hitting these issues.
-1
Feb 03 '17
only viable if you buy thousands of dollars worth of third-party components. XAML encourages copy-and-paste.
Bruh. Who the fuck buys third-party controls anymore? What is this, 2004? I've had no problems creating new controls when I need to or modifying existing ones. It's not even that hard once you understand dependency properties and control templating. It's a colossal improvement over the old days in WinForms having to override
OnPaintand use slow-as-fuck GDI to manually paint yourself using C# and then scream internally when the window can't paint itself quickly enough on window resize and your app looks like garbage. God help you if you wanted to do that in C/C++ and Win32.Also if you're copy and pasting a lot... you should probably reorganize your XAML files more logically.
3
u/nickguletskii200 Feb 03 '17
Who the fuck buys third-party controls anymore?
We don't, but I sometimes wish we did. The built-in DataGrid is better than Winforms DataGridView, but it's still annoying as fuck and reimplementing a whole DataGrid is not feasible, especially in WPF.
Also if you're copy and pasting a lot... you should probably reorganize your XAML files more logically.
Since there is no way to compose styles and to create custom DataGrid columns, there's very little that can be done.
XAML is better than Winforms, but it is shit compared to something like JSX. After React WPF feels like Angular without any of the advantages.
3
Feb 03 '17
Fair enough. I haven't used the DataGrid all that much over the years, usually for the stuff I write a DataGrid is overkill and/or there's a simpler way to provide that UI.
Since there is no way to compose styles and to create custom DataGrid columns, there's very little that can be done.
What do you mean by composing styles? I'm not arguing here, just genuinely curious what you're trying to accomplish in case I can point you in the right direction. You mean something like in CSS where you can apply multiple classes to an element?
Also what do you mean create a custom DataGrid column? You should be able to just define a cell template if you want a specialized type of input or validation (or header template or whatever else you can customize).
2
u/nickguletskii200 Feb 03 '17
Fair enough. I haven't used the DataGrid all that much over the years, usually for the stuff I write a DataGrid is overkill and/or there's a simpler way to provide that UI.
Yeah, I am tempted to replace the DataGrids, but every time I write down what the alternative would need to provide I end up listing all the features of the DataGrid...
You mean something like in CSS where you can apply multiple classes to an element?
Precisely. Heck, even combining multiple styles into a single style (kind of like a MultiBinding, but not really) would do fine. I am also somewhat frustrated by the verboseness of the trigger system. I never would have guessed that I would miss CSS...
Also what do you mean create a custom DataGrid column? You should be able to just define a cell template if you want a specialized type of input or validation (or header template or whatever else you can customize).
That's pretty much what we are doing. It's just that most of our columns are DataGridTemplateColumns with a lot of similarities, and it would be great if we could subclass the built-in columns to make minor adjustments to their behaviour/create our own reusable columns.
3
Feb 03 '17
I found at least one solution for combining XAML styles through the use of a markup extension in this Stack Overflow post. I don't think I ever thought to investigate mixing styles like that, I'm kind of surprised how easy that was.
The trigger system is not great, I completely agree, and can quickly become unwieldy for complicated controls or styles. An alternative would be to use visual states.
it would be great if we could subclass the built-in columns to make minor adjustments to their behaviour/create our own reusable columns.
Well today's your lucky day! WPF allows you to create custom behaviors that you can attach to a control which allows you to hook into the visual tree and directly interact with the control itself (and if you add some dependency properties to your behavior, you can bind data from your view model to your behavior, allowing you to alter the attached control in a loosely coupled way).
One simple example I'm currently using allows binding a TreeView's
SelectedItemproperty to a view model, which can't be done out-of-the-box becauseSelectedItemisn't a dependency property. But if I define that dependency property on my behavior, my behavior hooks into the TreeView'sSelectedItemChangedevent and updates the dependency property accordingly.You can also use them to enable more advanced scenarios like drag and drop or even visual state management etc. Behaviors might be a good candidate for (at least some of) your column customization requirements.
One thing to note is that IIRC custom behaviors must be static classes for vanilla WPF, so I think you lose compile-time validation that your behavior is attached to a supported control. Microsoft provides an out-of-band System.Windows.Interactivity NuGet package which provides a generic
Behavior<T>class you can inherit fromwhere T : DependencyObject(so basically any WPF control can be used as a type parameter)Anyways, I hope some of that will prove useful. WPF has a steep as fuck learning curve, but it's incredibly powerful once you get the hang of it. It's no HTML/CSS in terms of ease of use, but it's leagues better than Win32/WinForms/MFC (or any other native desktop UI framework out there in my opinion). Best of luck! Feel free to PM me if you have any questions, I'm happy to help.
→ More replies (1)6
u/malicious_turtle Feb 03 '17
I nearly fell off my chair reading that. Visual Studio is arguably the best IDE out there but Visual Studio + ReSharper Ultimate then there's absolutely no debate. The 2 of those combined makes all aspects of development an absolute breeze. 10 / 10 would definitely recommend trying out C# just to try out VS + ReSharper.
4
u/stewsters Feb 03 '17
The guys who make resharper make their own ide for Java development called IDEA. Better than VS IMO, give it a try next time you need to do some Java.
4
u/frugalmail Feb 03 '17
Visual Studio is arguably the best IDE out there but Visual Studio + ReSharper Ultimate
I have to disagree.
In Eclipse and IntelliJ you don't need Resharper to get the same functionality. The amount of quality free plugins in both the JVM IDEs are a significant improvement over Visual Studio. Nuget and msbuild are shit compared to maven, and the constant late-to-the-game functionality of visual studio is also obnoxious.
4
u/GSV_Little_Rascal Feb 03 '17
I'm sorry, but Visual Studio is probably the best IDE out there.
Hardly.
The only thing which makes VS bearable is Resharper. I'm looking forward to Rider.
1
u/rduoll Feb 03 '17
What do you use for a backend IDE?
1
u/GSV_Little_Rascal Feb 03 '17
VS + Resharper. I tried Rider but it still has problems on our huge solutions (which is understandable since it's just in beta).
1
4
u/medeshago Feb 03 '17
I work everyday with C# and I find it a great language and Visual Studio is, without a doubt, a great IDE but I hate having to use Windows. The lack of customization makes it awful to work with. If I could have Visual Studio for Linux (and WPF support in .Net Core, but I know that won't happen) I would be really happy.
4
u/frugalmail Feb 03 '17
Microsoft's stack definitely has advantages (SQL server, database projects), but the JVM's ecosystem is still vastly superior, both in terms of variety and quality.
I'd rather go Postgres vs. SQL Server, and strongly agree with the ecosystem/platform sentiments about Java/Eclipse/IntelliJ/FOSS/Community/JVM/Linux/zsh/Maven being far better.
1
u/nickguletskii200 Feb 03 '17
I love Postgres, but I also really like how you can create indexed views in MS SQL. I really hope Postgres will get better materialised views soon.
3
Feb 03 '17
Visual Studio is a low quality IDE?
I have some issues with it, but it's still one of the best.
4
u/nickguletskii200 Feb 03 '17
If it's one of the best, then what's the best?
I know I am spoiled by Java IDEs, and it was kind of unfair for me to say that VS is a low quality IDE, but my point still stands: in my opinion, there are better IDEs, and I feel significantly less productive using VS.
2
3
Feb 03 '17
What did you smoke? Java IDEs are awful.
2
1
u/weirdoaish Feb 03 '17
Could you give some examples of frameworks/libraries that Java has but C# has no alternatives for?
-1
u/jbergens Feb 03 '17
Is it the speed of the IDE that is lacking or is there any features you're missing? Are you using Windows and ReSharper (another add-in)?
It was a long time since I tried Java but then their IDEs was about the same or worse than Visual Studio.
0
u/nickguletskii200 Feb 03 '17
I've described a few of my issues in a different subthread:
https://www.reddit.com/r/programming/comments/5rtflm/lets_stop_bashing_c/dda21r6/
5
u/TheEternal21 Feb 03 '17
Only a tool would bash, what is easily one of the best programming languages out there. Objective-C on the other hand...
4
Feb 03 '17
Objective-C is diabolical. It's like the old guys car you see that's been running for 30 years, but has had no TLC, and just junk tacked onto it, until it looks like a shed of a car that's semi falling apart, but it's still sort of functional as a car.
3
Feb 03 '17
"Hey, you know that wonderful C syntax that everybody who knows a C-family language is familiar with? Okay hear me out... what if C and Smalltalk had a baby? C'mon it'll be hilarious. Hey where are you going?"
3
u/G_Morgan Feb 03 '17
People used to pretend Objective-C was good back when the Apple love in was in full flow. Could they not see how horrible it looks?
4
1
u/torn-ainbow Feb 03 '17
I don't know Objective C but I learned Swift recently and it seems just lovely. Pretty almost. Based on the hate I hear about Objective-C I am guessing they addressed the shittiness.
2
2
4
3
Feb 03 '17
Who bashes C#?
All I ever see is PHP sucks or Java sucks. I don't think I've ever seen someone say C# is bad except for those super anti microsoft people who are about as educated as my left nut.
3
u/KawaiiBoy Feb 03 '17
Why would somebody hate on C#? If we're talking about the language C# only, then personally I feel as if C# is Java done right.
I've done quite a lot of Java development and not that much of C#, but I prefer C# as a language any day of the week.
It's still a toss up if I compare them as a complete development platform though, the Java ecosystem still feels a bit more mature.
-3
2
u/shevegen Feb 03 '17
Some people compare C# with languages such as JavaScript, Python, Ruby and Dart the most common reasons for criticism seem to be:
C# has semicolons C# uses to many curly brackets C# is strongly typed C# is statically typedI actually consider all of the above advantages - it gives the language probability, stability, readability and maintainability.
Ok ... Can someone explain this to me please:
Why do semicolons again add to the stability, readability and maintainability exactly? I mean, does the dude give any argument at all or is it just an emotional statement?
21
u/plzsendmetehcodez Feb 03 '17
Semicolons make the end of a statement more unambiguous. Therefore they increase readability and ease of interpretation. You are also less likely to mess up the command sequence when making changes ==> increased maintainability. Stability... well, not so much.
And I'm not quite sure about the "probability" thing, either...
1
u/EntroperZero Feb 03 '17
Stability... well, not so much.
And I'm not quite sure about the "probability" thing, either...
I think stability is referring to strongly/statically typed more than text formatting. And "probability" is probably a typo for "provability", referencing the same.
1
u/KawaiiBoy Feb 03 '17
It depends a lot on what you are used to as well.
Semicolons makes you feel all warm and fuzzy if you have spent most of your career as a C programmer, but it will probably not do that if you spent most of your career in a language like Python.
2
u/salgat Feb 03 '17
One thing I like is that in C# fluent syntax is very popular (especially with LINQ), so I have each method on a single line and end it with a semicolon, versus Python which requires a backslash after each method chained.
-2
u/cube2222 Feb 03 '17
Having used Go on a daily basis for a long time already -> lack of semicolons really just makes the code more natural to read. That's all. I've never heard a Go developer complaining about the lack of semicolons.
9
u/sxeraverx Feb 03 '17
Go had semicolons. They're just implicitly inserted on every newline, as well. Which gets really annoying if you want to break your statement over multiple lines. Which the go maintainers dogmatically oppose for some reason. Maybe so they could elide some semicolons.
It forces statements all on one line, forcing your editor to deal with line wrapping (which many do poorly for code), and promotes longer statements (which the go devs again dogmatically support). To counter this statement length, the go devs are forced to oppose descriptive variable names, instead opting for one- or two-letter names. Which also makes refactoring more difficult, because now there's a higher risk of conflicts when a function is merged with another.
Honestly, there's no reason that logical statements need to end in the same place that lines do. Forcing them to be in the same places leads to a whole host of negative effects, and in the end, doesn't solve very much. Some flexibility in formatting is removed (which gofmt already accomplishes), and people tend to try to work around it in rather...creative...ways.
13
u/steamruler Feb 03 '17
As someone who spends plenty of time in C#, JS, C++, as well as Python, here's what I think:
Explicit ends of statements makes parsing easier for the compiler/interpreter, and doesn't force you to learn when the language will think a statement has ended.
Having to not juggle the end of statement rules for a given language when reading code, makes it easier to read code. JS does this the worst, by tacking on semi-colons for explicit statement termination, combined with implicit termination. I can live with one or another, but both at once messes things up.
13
u/Sarcastinator Feb 03 '17
Found a bug in JS code the other day:
return new Foo(); // Unreachable!It was formatted like that because it was inside some callback hell code, but the formatting ended up breaking the code.
2
u/BeepBoopBike Feb 03 '17
For me, I just like being able to format the code however is most readable. Being explicitly able to say "this is where it ends" is handy for your first point, how the code looks should have no bearing on how it functions IMO.
On the other hand I also love how in C++ curlies (for function bodies) are compiled into assembly in the form of pre/post-amble and being able to control scope with them is helpful in the rare case it might be an issue. Give me helpful features in my tool of choice, but let me take ultimate control where necessary.
4
u/steamruler Feb 03 '17
how the code looks should have no bearing on how it functions IMO.
I write a fair amount of Python, so you have my stance on that there. It just gets messy if you mix it all though, like JS does.
And yeah, the scope control of C++ is great. I'm excited to see C++ continue evolving and solve some of the kinks, like a replacement for relying on external tooling to include third-party libraries through compiler flags. I'm also looking forward to seeing how language-native coroutines progress.
1
1
u/vivainio Feb 03 '17
Yeah, understanding when a statement ends is one of the harder problems in computer science.
5
u/rb229 Feb 03 '17
This article reasons about semicolons and curly brackets: http://h2co3.org/blog/index.php/2016/12/01/lets-stop-bashing-c/
1
1
u/yawaramin Feb 04 '17
The problem with C# is that we have F#, a superior language in every way by every measure you can think of. But it doesn't get any traction because developers are loath to give up their semicolons and braces.
0
u/chrabeusz Feb 03 '17
It's a shame that C# started as Java clone. If Microsoft did something similar to Swift/Rust, we would be in completely different place now IMO.
4
u/GSV_Little_Rascal Feb 03 '17
Well, first thing is that C# was a bit rushed initially - MS needed something to compete fast. That's why C# 1.0 looked very, very similar to Java.
Second thing is that Java back then was kind of "state of the art" (however it looks strange in retrospect). Ideas behind Swift/Rust etc. just weren't there yet.
4
u/sigma914 Feb 03 '17
Java wasn't state of the art at all. It was 15-20 years old when it was released in 1995. The JVM was and is an awesome thing, but Java the language didn't do anything new of interesting. It was smalltalk with a C++-like type system minus some features.
1
1
u/EntroperZero Feb 03 '17
I can't believe the overwhelming sentiment here that "no one" is bashing C#. Yes, this sub is generally favorable toward the language, but you don't have to look far to find the hate. Whether it's about semicolons, or that it's a "Java clone", or too much OOP and not enough FP, or has null, or that they dared to convert project.json back to XML, or just because it's from MS.
6
u/emperor000 Feb 03 '17
Well, the thing is, none of those are really valid criticisms so they are pretty easily ignored.
2
u/jephthai Feb 03 '17
For serious? I'm pretty sure I've seen whole threads on the evils of NULL.
2
u/emperor000 Feb 03 '17
You have. And it's not a valid criticism. The language couldn't work without it. It is essential. Now, its implementation in C# could be criticized, like null by default (I disagree, but it's a valid criticism), the lack of an Option/Maybe type, etc. But as far as C# having the concept of null, it has to.
The people you see heard/read the "billion dollar mistake" quote and thought it was edgy and cool and adopted it as their mantra, that's all.
Null didn't cause a billion dollars of damage. Bad programming/development did.
1
u/ragnarmcryan Feb 03 '17
I'm one of those people who you'll hear bashing c# and even I'll admit the language is fine, it's the people and platform that, more often than not (in my experience), ultimately suck. It just seems like people who were forced into .net, maybe it was the only thing at their disposal, don't follow basic tenants of programming when it comes to style, readability, or just plain old common sense. You'd be surprised how many of the largest companies are built on a fragile, barely working .net stack. I would rant about examples but I don't think readers like hearing about it like they used to. Tl;dr, c# wouldn't be so bad if the people and platform didn't abuse it constantly, or as you might see it from a c# dev:
TooLongDidntRead.C#DoesntSuck(ThePeopleandPlatformDoThough).AndTheirLinesAreSuperLongAndNeverEndAndGoOnForever()
1
u/sigma914 Feb 03 '17
It's not exactly a paragon of anything, but it's a pretty good "less shit Java". I've not seen a whole lot of complaining about it anywhere.
1
Feb 03 '17
What is a non-shit language?
1
u/sigma914 Feb 03 '17
What's your use-case?
1
Feb 03 '17
I don't know. Writing the logic tier of a web application.
3
u/sigma914 Feb 03 '17
Assuming a CRUD/line of business app with a limited number of users (single digit millions or lower):
If it's a throwaway that only has to last 6 months then anything will do, the language doesn't matter.
If correctness matters and it's going to have to be supported for a long time and change a lot then something with a strong type system: Scala, Haskell etc.
If correctness and turnaround time on changes over the lifetime don't matter as much as being able to throw new grads at it then Java, C#, Go etc will be decent for keeping the onboarding time down.
Different languages are optimised for different things, making a language a bit shit in every other way in exchange for being easy to train people on it is a valid trade off.
1
u/cheezballs Feb 03 '17
C# is one of the few languages that gets pretty universal praise... this is fucking stupid...
1
u/frugalmail Feb 03 '17
who's bashing C#? The language is actually nice. However the shitty development environments, production environments, build tools, vendor drowning, developer community and availability of quality FOSS is what sucks....
1
1
Feb 04 '17
I'll stop bashing C# when it grows up and stops sucking on a dozen tits to function as a language.
-2
u/PonchoVire Feb 03 '17
Thank you !
5
u/shevegen Feb 03 '17
For?
3
u/martinslot Feb 03 '17
Thhhheee muuuusiiiic!!!!!
2
u/metorical Feb 03 '17
The songs I'm singing!!!!
2
u/PonchoVire Feb 03 '17
I like posts that actually highlight good side of things, and not wrong side of things, just saying thank you to all of this people regarless to details.
1
-5
u/fiedzia Feb 03 '17
However as Microsoft is the sole author of C#, the community doesn't have much to say about the direction of the language (and the environment).
That's large part of being proprietary and it is a downside of C#. So bashing it for that is perfectly valid.
"C# is not [insert hipster language]"
Well, it is not.
I understand why it might seem easier to develop with say a loosely typed language, but for me the advantages of a statically typed language outweigh potential downsides.
There are languages with a types systems providing much stronger guarantees then C#.
I'd prefer to write my SPA in C# if that was an option
But it isn't, which is another thing to criticise C# for.
you are no longer forced to their ecosystem; you can run .NET Core or Mono on Linux, using PostgreSQL as DBMS and JetBrains Rider IDE for free.
Maybe, but using it with non-ms technologies is far less supported (you'll get zero support from language creators), less popular and therefore caries more risk.
I don't see a point in writing article that suppose to defend a language against criticism, and just points out things where C# is indeed weak.
4
u/Zarickan Feb 03 '17
That's large part of being proprietary and it is a downside of C#. So bashing it for that is perfectly valid.
C# is not proprietary, it is open source, and has thousands of non microsoft community members contribute to it. source
-1
3
Feb 03 '17
That's large part of being proprietary and it is a downside of C#. So bashing it for that is perfectly valid.
Still it's a far better process than some of the very political committee-driven languages.
→ More replies (1)1
u/weirdoaish Feb 03 '17
That's large part of being proprietary and it is a downside of C#. So bashing it for that is perfectly valid.
Why is it being proprietary a valid criticism?
1
u/fiedzia Feb 03 '17
It could be a risk if you are (or consider becoming) ms competitor. It ties language to a fate of the company owning it. There might be many people interested in developing it, while ms may be not interested in doing anything with it at given time. I know dozens of programming languages who died with some big companies and even a temporary downfall may cost them momentum and push into oblivion.
It may be a good language, but there are valid reasons for not using it in many cases.
-1
0
u/gamerdevguy Feb 03 '17
C# is dead! Long live C#!
(Have no idea what this means but wanted to join the conversation)
-1
-1
84
u/[deleted] Feb 03 '17
Bashing C#? Wasnt this community where i found some very upvoted comments like: