notes-computer-programming-programmingLanguageDesign-prosAndCons-Csharp

opinions

"

Most .NET devs (myself included) really enjoy the Visual Studio Environment. So, if you prefer a text editor like vim, it may not be the right tool for you.

The debugger is hard to beat (as Jeff mentions). C# has kept up with most features (LINQ, dynamic, async/await, etc) that are available in Ruby, and the CLR is quite fast. The core libs are also very solid. ASP.NET MVC is very comparable to Rails. "

--

sker 8 hours ago

link

Yes, C# tends to copy F# features in the way of compiler-syntactic-sugar. I wonder if Type Providers will be next. Async/await have been around for a couple of years and I haven't heard of the next big C# feature, other than Roslyn.

reply

danabramov 8 hours ago

link

They seem to be pretty busy with Roslyn, Anders recently admitted it's taking longer than originally expected. So perhaps we need to give 'em a break. The only thing I heard about C# 6 so far is it's maybe going to have more compact class declarations, a-la F# or TypeScript?.

reply

MichaelGG? 8 hours ago

link

C# 2 added generics (courtesy of the same people that did F#) and closures (albeit with syntax as verbose as JS).

C# 3 added LINQ, which is a major breakthrough for end-users, although I'm not fond of the query language. So really, C# 3 just added in some basic features you expect from proper languages. I do understand this required a huge amount of work, esp. with the tooling required.

C# 4 added dynamic (F# provides ? operator you can provide your own implementation for, if you really feel that strings look ugly). Oh, and it finally backpedalled on the no optional parameters (although the optional parameters is the same broken C-style callsite implementation).

C# 5 added async (F# had a more flexible implementation 6 years before).

What else? C# seems to have stagnated, although I understand that's a feature for some of their users. C# still lacks type inference in most places, making it extra verbose. C# expression trees are still very limited. C# still can't easily do tuples. Not sure they deserve a break; this was MS's "flagship" language.

OTOH, The CLR itself doesn't seem to be getting any upgrades, either - IL stayed locked at v2. It's as if they realised they have done better than the JVM can ever do (generics via erasure just sucks) so why bother pushing it further?

reply

-- " Q: Why do you say Microsoft's C# is Java without the reliability, productivity or security? A: You find stuff in it that has essentially loopholes for everything. They had this problem in their design rules that they had to support C and C++, which means you have to have a memory model where you can access everything at all times. It's the existence of those loopholes that is the source of security, reliability and productivity problems for developers. So on the one hand, they copied Java, and on the other hand, they added gratuitous things and other things that are outright stupid. That's amusing. "

--

"

NV: What about C#’s injected into-dynamic language features? Do they really make a difference?

JW: Are you thinking of things like the ‘dynamic’ keyword in C#? If so, I can only say that my experience “in the wild” is that most developers don’t use that. I’m not sure we should be too quick to say, “Oh, it’s because C# programmers refuse to consider dynamic typing”, however. Many people I teach are barely using Linq or lambda expressions, which showed up in C# a release before “dynamic”.

The “Ooh, that’s actually useful” moment people tend to have with dynamic is when I show them how, with the appropriate library, you can use dynamic typing in C# to dig into JSON documents, just like you would do in JavaScript?. “Oh, we don’t have to build a load of types to deserialize this stuff into!” So, mostly it’s showing people how things are actually useful. "

--

"In the field of programming languages two fresh starts have been attempted recently. I refer to Java and C#. Both tend to restrict rather than augment the number of features, trying to suggest a certain programming discipline. Hence they move in the right direction. This is encouraging. But there remains still a long way to reach Pascal, and longer even to Oberon." -- http://www.swissdelphicenter.ch/en/niklauswirth.php

--

Pxtl 1 day ago

link

Once again, I will sing praises of C#. Some of the libraries are terrible, and it's Microsoft... but seriously, it fits the perfect happy medium between Java's clumsiness and Scala's everything-plus-the-kitchen-sink syntax.

--

https://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java

--

https://news.ycombinator.com/item?id=8596919

https://news.ycombinator.com/item?id=8596497

---