4 ms·
It'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 cho
by TillE 13y ago
It'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#.
- Touche 13y agoNot too bad. Actions return null though. How about a self-executing function that returns a value? This is useful for assigning values to variables. IIRC it's going to start getting more ugly from here.
- noblethrasher 13y ago(new Func<int>(() => 2))();
- CmonDev 13y agoBut Python only supports dynamic where C# supports both static and dynamic. It's a good trade-off.