Friday, August 29, 2014

Summer reading

For various reasons I haven't had time to make even semi-regular blog posts, so I thought I'd clear the decks a little by listing selected contents of my "recently read" basket, before I file them.


Read more »

Monday, August 04, 2014

More on composing queries in F#

I ran across some StackOverflow questions from a couple of years ago asking about composing query expressions in F#, and gave answers showing how FSharpComposableQuery can help with this:

http://stackoverflow.com/questions/13826749/how-do-you-compose-query-expressions-in-f

http://stackoverflow.com/questions/10158512/dynamic-sql-queries-with-f-3-0

Tomas Petricek's previous posts on dynamic LINQ queries in C# and F# 2.0 were, of course part of the inspiration for our work.  FSharpComposableQuery updates these ideas to F# 3.0 and, hopefully, makes them easily usable without the need for tricks.

I also ran across a more recent blog post by Loïc Denuziere that discusses the related issue of how to splice partial F# query expressions together to build more complex ones.  His approach cleverly defines an alternative query operator, pquery, that can be used to define query snippets that don't get evaluated immediately.  He suggests the following code (copied from the end of the post):

Read more »

Labels: , ,