LINQ is a Monad

Discussion in 'Automated Trading' started by nitro, Jul 14, 2009.

  1. nitro


    Interesting, aye?

    LINQ also takes advantage of fluent interfaces for syntactic sugar. Interesting that fluent interfaces made their explicit debut in Smalltalk.
  2. nitro


    Using a fluent interface, you could write something like this in C#:

    Nice, aye?
  3. nitro


  4. rosy2


    what kind of overhead does using LINQ add? I looked at it for a very short time and thought it was cool but never did anything with it
  5. That pretty much depends on the implementation.

    The method shown above is either a sequence of function calls (with pretty much no overhead than the function calls), or a query node graph on an IQueryable interface - which has some overhead, the but main question here is how the IQueryable will deal with the node graph. If it gets forwarded to a SQL statement, then the overhead of the node graph is pretty low, but then - sql may not be the best way to deal with it.

    In general, the pure LINQ overhead will be extremely low, but you open - like in any other approach - the door to implementation issues.
  6. LINQ, F#, the DLR,...amazing things going on there.

    I am a Java guy, but downloaded Mono and was pleasantly surprised to find it compiles and works like a dream on RedHat without the usual GNU autoconf issues.

    I suppose the only reason people stay away from it now is that you never know if MS is going to sue once Mono becomes popular. This is even after their recent move promising to not sue for patent infringement, the legal details of which escape me.

    I would love to use C# with LINQ for my server-side projects but this is what stops me...
  7. Not smart to let that stop you.

    Ms has made their position ablatantly clear legally. Point. THe promie is legally binding in this case, simply because the valid defense of acting in good faith and with the explicit (and undisputable) permission of the patent holder.
  8. nitro


  9. nitro


  10. nitro


    #10     Aug 20, 2010