Being Fluent, Fluid and Functional with Monads.net

The Discussion

  • User profile image
    db805

    This looks great, does it support .net 4.5 ?

  • User profile image
    MikeRore

    Quote: "monads.net isn't required or even endorsed for working more functional goodness into your C# code, but it's a great tool to start learning and sparking ideas with."

    Wait, what? How is it not endorsed?

     

  • User profile image
    Derp

    Great, so it's the vb.net keywords flipped on the 90 degree bias to be fluent. Also grammar.

  • User profile image
    Pragmateek

    Nice stuff, thanks for sharing. Smiley

    Note that for events handlers there is a trick to avoid checking for null:

    public event EventHandler Updated = delegate{};
    
    public void Update()
    {
        Updated(this, EventArgs.Empty);
    }

    So from the start you have at least one empty delegate to execute, and a priori even a malicious code can't remove the original empty delegate so you always have one.

    You can consider this an application of the "null object" pattern.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.