News for hackers. Stuff that matters.
Re:C# Language Specification 5.0 by MichaelGG on Tuesday June 25, 2013 @12:39AM (#5937562)
Yeah, C#'s async is a weak version of F#'s workflows, but with a single hard-coded implementation. Research (Haskell) and other languages filter into F# (and team), which filters into C#. F# has had async workflows since 2007.

LINQ's another example of a place where the C# team sighted one end advantage (queries) and implemented the minimum to make it work. That's why all the features around the main LINQ part are half-assed (limited expression trees, ambiguous lambda syntax, very limited type inference.)

Overall, C#'s a nice enough language for a lot of projects. The tooling really helps sells it, too. It's just rather verbose and limiting, unnecessarily. I just can't think of any place where C# the language is significantly better than F#.

But, if you're ranking it against the likes of Java, then yes, C# is close to perfect.

Edit: C# implements a lot of stuff right into the compiler, things that'd be useful more generically. For instance, foreach and collection initializers use duck typing that's baked into the C# compiler. That's a generally useful feature, but again, hard coded for a specific scenario. F# has some of that too, but not to the same extent (F# warts arise mainly when you push the edge of F#-C#ish interop).

Re:C# Language Specification 5.0 by runT1ME on Tuesday June 25, 2013 @03:09AM (#5937999)
Why would you need workflows when you have LINQ. It's full fledged monadic comprehension and you can use it with Async beautifully.
Re:C# Language Specification 5.0 by pjmlp on Tuesday June 25, 2013 @02:30AM (#5937896)
Yes, but C# is a better fit for the enterprise world than F#.

Currently my F# code is mainly for scripting when doing .NET projects, but only if I am the only user of such scripts, otherwise Powershell.

Anyway I really appreciate the work Microsoft puts on F#, Haskell and OCaml via their research arm.

Re:C# Language Specification 5.0 by Associat0r on Tuesday June 25, 2013 @02:57AM (#5937967)
Why would C# inherently be a better fit for the enterprise world?
Re:C# Language Specification 5.0 by pjmlp on Tuesday June 25, 2013 @03:29AM (#5938051)
Because most Fortune 500 employees by definition are code monkeys that won't touch FP concepts, just doing the typical CRUD applications full of design patterns.

Having FP concepts sneak in C# is easier to get them introduced in this world, than forcing this type of developers to use something like F#.

This why Erik Meijer decided the best way to bring FP to the enterprise was via Visual Basic.

http://research.microsoft.com/en-us/um/people/emeijer/papers...