• C#-Style Events In Scala

    As you may know, C# has a rather lovely little feature whereby you can setup an event on a class, like so:

    Read on →

  • NOD32 IMON Component Is Just Plain Dangerous

    Recently I started to receive some rather strange error messages from some .NET programs I had written that made use of the WebRequest class. The exception was something like this:

    Read on →

  • Arbitrary Restrictions On C# Generic Constraints

    I’m really feeling the pain of the simplicity of C#’s generics system. I have found some situations where I could introduce more type safety by being able to refer to a type parameter on the left hand side of a generic constraint which is not a parameter of the immediate definition, but rather that of an enclosing class. For an example of what I mean, see this:

    Read on →

  • Todays Java Atrocity

    ```java class SomeLibraryClass { public SomeLibraryClass(Class klass) { // Use klass to overcome Java generics limitations } }

    Read on →

  • Implementing The Disposable Pattern In Scala

    One excellent feature of the CLR in general and C# in particular is deterministic finalization: the ability to control when resources are released. In C# this is realized with the IDisposable interface and the using keyword. Effectively, the statements:

    Read on →