News for hackers. Stuff that matters.
Re:More functional C# by pionar on Sunday January 12, 2014 @10:01PM (#7048644)
With 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

Re:More functional C# by darklajid on Monday January 13, 2014 @06:48AM (#7050043)
Speaking 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'.

Re:More functional C# by Touche on Monday January 13, 2014 @08:50AM (#7050494)
> Do you have any examples?

Sure, write a self-executing function in C#.

Re:More functional C# by paulmcpazzi on Monday January 13, 2014 @09:12AM (#7050604)

  ((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#.
Re:More functional C# by Touche on Monday January 13, 2014 @10:23AM (#7051032)
Not 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.
Re:More functional C# by noblethrasher on Monday January 13, 2014 @10:45AM (#7051183)

    (new Func<int>(() => 2))();