Archive

Archive for March, 2010

Static vs. Dynamic Typing (Reflections on the Original Wiki)

March 24, 2010 5 comments

I’m not sure how I stumbled on the original Wiki at C2. It was probably (like a lot of people) an interest in the hype around “extreme programming” (remember that? “If it doesn’t work, you’re doing it wrong” – great times!)

I’m pretty sure all of my tiny flurry of activity on it was concentrated into a few months during 2000 (possibly a little in 2001), when it was already a sprawling activity-hive. So at least I wasn’t able to graffiti over it too painfully.
Read more…

Thread-Safe Mutable Objects using WSL (When, Silently and Loudly)

March 10, 2010 2 comments

What does this look like?

class ThreadSafeQueue<T> : ThreadStateful
{
    private readonly Queue<T> _queue = new Queue<T>();

    public void Enqueue(T item)
    {
        Loudly(() => _queue.Enqueue(item));
    }

    public T Dequeue()
    {
        return When(() => _queue.Count != 0)
               .Silently(() => _queue.Dequeue());
    }
}

Read more…

Categories: Uncategorized Tags: ,

That Unfortunate Interaction Between Multicast Delegates and Contravariance in C# 4.0

March 1, 2010 Leave a comment

About seven months ago, a little while after VS2010 Beta 1 came out, I was thinking about events, and to what extent the typical eventing pattern in .NET is necessary or unnecessary. Would it be okay to use Action as the delegate type, for example?
Read more…

Categories: C# 4.0, delegates Tags: ,
Follow

Get every new post delivered to your Inbox.