Blog - Title

June, 2009

  • Fabulous Adventures In Coding

    “Out Of Memory” Does Not Refer to Physical Memory

    • 59 Comments
    I started programming on x86 machines during a period of large and rapid change in the memory management strategies enabled by the Intel processors. The pain of having to know the difference between “extended memory” and “expanded memory” has faded with...
  • Fabulous Adventures In Coding

    It Already Is A Scripting Language

    • 51 Comments
    My recent post about the possibility of considering maybe someday perhaps adding "top level" methods to C# in order to better enable "scripty" scenarios generated a surprising amount of immediate emphatic pushback. Check out the comments to see what I...
  • Fabulous Adventures In Coding

    What does the optimize switch do?

    • 40 Comments
    I was asked recently exactly what optimizations the C# compiler performs when you specify the optimize switch. Before I answer that, I want to make sure that something is perfectly clear. The compiler’s “usage” string is not lying when it says: /debug...
  • Fabulous Adventures In Coding

    The void is invariant

    • 21 Comments
    [UPDATES below] A while back I described a kind of variance that we’ve supported since C# 2.0. When assigning a method group to a delegate type, such that both the selected method and the delegate target agree that their return type is a reference...
  • Fabulous Adventures In Coding

    Why Doesn't C# Implement "Top Level" Methods?

    • 58 Comments
    C# requires that every method be in some class, even if it is a static method in a static class in the global namespace. Other languages allow "top level" functions. A recent stackoverflow post asks why that is. I am asked "why doesn't C# implement...
  • Fabulous Adventures In Coding

    Bug Psychology

    • 30 Comments
    Fixing bugs is hard. For the purposes of this posting, I’m talking about those really “crisp” bugs -- those flaws which are entirely due to a failure on the developer’s part to correctly implement some mechanistic calculation...
  • Fabulous Adventures In Coding

    Mmm, Curry

    • 9 Comments
    A recent comment asked why Haskell programmers sometimes write C# lambdas in this style: Func<int, Func<int, int>> add = x=>y=>x+y; which is then invoked as sum = add(2)(3); because of course the first invocation returns...
  • Fabulous Adventures In Coding

    Making it easier

    • 19 Comments
    I read an article in a technology column on MSNBC a while back, the upshot of which was “I have umpteen-dozen passwords I’ve got to have memorized these days; I thought technology was supposed to make my life easier!” Really? First of all, let’s...
  • Fabulous Adventures In Coding

    Use your legs, not your back

    • 11 Comments
    In C# you can "lift", "raise" and "hoist", and they all mean different things. To "lift" an operator is to take an operator that operates on non-nullable value types, and create from it a similar operator that operates on nullable value types. (We...
  • Fabulous Adventures In Coding

    Iterators at the Summer Games

    • 14 Comments
    Ed "Scripting Guy" Wilson was kind enough to ask me to be a guest commentator at this years Summer Scripting Games , which have just completed. I've been working on a series for this blog about some unusual cases in the design of the "iterator block...
  • Fabulous Adventures In Coding

    Alas, Smith and Jones

    • 14 Comments
    We have a feature in C# which allows you to declare a " friend assembly ". If assembly Smith says that assembly Jones is its friend, then code in Jones is allowed to see "internal" types of Smith as though they were public(*). It's a pretty handy feature...
  • Fabulous Adventures In Coding

    Fabulous Adventures In Russian

    • 11 Comments
    I am pleased to announce that a bunch of our Russian MVPs who (1) are awesome people and (2) apparently have some free time on their hands, have started translating this blog into Russian, of all things. So if you want some Фантастичные приключения на...
Page 1 of 1 (12 items)