[Haskell-Cafe] Linq (FP in C#)

Peter Verswyvelen bf3 at telenet.be
Sat Jan 12 09:17:23 EST 2008

Yes indeed. And you forget "expression trees": code gets translated into 
an AST like tree, and then you can use that tree for anything you want 
(like compiling different other code, or code for another platform)

Hugh Perkins wrote:
> Linq went live in C# in November, as part of .Net 3.5.
> It adds lots of FP-things to C#.
> It's really fun to be able to use Haskell-ish things in C#.
> Manipulating lists and collections just got *much* easier.
> Things it does:
> - map, fold, filter are all there (they're called "select", "agregate", "where")
> - limited support for laziness (since .Net 2.0; you can write a lazy
> "zip" function; I couldnt figure out how to write a lazy "unzip"
> function)
> - you can extend the methods available on all lists and collections
> - lambda expressions
> - type inferrence (technically, this is part of .Net 3.x, rather than
> specific to Linq).
> Things it doesnt do:
> - recursion doesnt seem particularly optimized (quick 2 minute test, I
> could be wrong)
> - no way to enforce purity
> It's an interesting vindication of the ideas in Haskell that C#, a big
> mainstream language, has integrated ideas from it, and that they're in
> production today.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list