Fabulous Adventures In Coding
Eric Lippert's Erstwhile Blog
Continuing to an outer loop
When you have a nested loop, sometimes you want to “continue” the outer loop, not the...
Author: Eric Lippert Date: 01/11/2010
Is there such a thing as too much precision?
Well, enough chit-chat, back to programming language design. Suppose you’re building...
Author: Eric Lippert Date: 01/07/2010
Constraints are not part of the signature
What happens here? class Animal { } class Mammal : Animal { } class Giraffe : Mammal { }class...
Author: Eric Lippert Date: 12/10/2009
What's the difference between covariance and assignment compatibility?
I've written a lot about this already, but I think one particular point bears repeating. As we're...
Author: Eric Lippert Date: 11/30/2009
The Purpose, Revealed
Interestingly enough, no one correctly guessed why I needed code in the compiler to transform a...
Author: Eric Lippert Date: 11/25/2009
Always write a spec, Part Two
Upon submitting that specification for review, even before seeing my code, Chris found a bug and an...
Author: Eric Lippert Date: 11/23/2009
Always write a spec, part one
Joel had a great series of articles many years ago about the benefits of writing functional...
Author: Eric Lippert Date: 11/19/2009
Closing over the loop variable considered harmful
(This is part one of a two-part series on the loop-variable-closure problem. Part two is here.)...
Author: Eric Lippert Date: 11/12/2009
Simple names are not so simple, Part Two, plus, volcanoes and fried foods
I've returned from a brief vacation, visiting friends on the island of Maui. I'd never been to that...
Author: Eric Lippert Date: 11/05/2009
Simple names are not so simple
C# has many rules that are designed to prevent some common sources of bugs and encourage good...
Author: Eric Lippert Date: 11/02/2009
I have a Fit, but a lack of Focus.
Here's a statement I read the other day about making comparisons between objects of reference type...
Author: Eric Lippert Date: 10/29/2009
Begging the question
In my last post I described the syllogism "Photogenic people look good in photograps; Michelle...
Author: Eric Lippert Date: 10/22/2009
What is this thing you call "thread safe"?
Caveat: I am not an expert on multi-threading programming. In fact, I wouldn't even say that I am...
Author: Eric Lippert Date: 10/19/2009
As Timeless As Infinity
User: Recently I found out about a peculiar behaviour concerning division by zero in floating point...
Author: Eric Lippert Date: 10/15/2009
Absence of evidence is not evidence of absence
Today, two more subtly incorrect myths about C#. As you probably know, C# requires all local...
Author: Eric Lippert Date: 10/12/2009
What's the difference between "as" and "cast" operators?
Most people will tell you that the difference between "(Alpha) bravo" and "bravo as Alpha" is that...
Author: Eric Lippert Date: 10/08/2009
Why No Extension Properties?
I'm frequently asked "you guys added extension methods to C# 3, so why not add extension properties...
Author: Eric Lippert Date: 10/05/2009
Why does char convert implicitly to ushort but not vice versa?
Another good question from StackOverflow. Why is there an implicit conversion from char to ushort,...
Author: Eric Lippert Date: 10/01/2009
String interning and String.Empty
Here's a curious program fragment: object obj = "Int32";string str1 = "Int32";string str2 =...
Author: Eric Lippert Date: 09/28/2009
Why is covariance of value-typed arrays inconsistent?
Another interesting question from StackOverflow: uint[] foo = new uint[10];object bar =...
Author: Eric Lippert Date: 09/24/2009
Why do ref and out parameters not allow type variation?
Here's a good question from StackOverflow: If you have a method that takes an "X" then you have to...
Author: Eric Lippert Date: 09/21/2009
West of House
West of HouseYou are standing in an open field west of a white house, with a boarded front...
Author: Eric Lippert Date: 09/17/2009
What's the difference between a partial method and a partial class?
Like "fixed" and "into", "partial" is also used in two confusingly similar-yet-different ways in C#....
Author: Eric Lippert Date: 09/14/2009
What's the difference between conditional compilation and the conditional attribute?
User: Why does this program not compile correctly in the release build? class Program { #if DEBUG...
Author: Eric Lippert Date: 09/10/2009
Sorry about the CAPTCHA
A quick metablogging note. Those of you who comment on this blog (6700+ comments and counting, thank...
Author: Eric Lippert Date: 09/10/2009
What's the Difference, Part Five: certificate signing vs strong naming
Both strong naming and digital signatures use public key cryptography to provide evidence about the...
Author: Eric Lippert Date: 09/03/2009
What's the Difference, Part Four: into vs into
The keyword "into" in a query comprehension means two different things, depending on whether it...
Author: Eric Lippert Date: 08/31/2009
What's the Difference? Part Three: fixed vs. fixed
I got an email the other day that began: I have a question about fixed sized buffers in C#: unsafe...
Author: Eric Lippert Date: 08/27/2009
Iterator Blocks Part Seven: Why no anonymous iterators?
This annotation to a comment in part five I think deserves to be promoted to a post of its own. Why...
Author: Eric Lippert Date: 08/24/2009
Queueing Theory In Action, plus, frogs
Well that was a lovely vacation. It got off to a poor start but then it improved dramatically....
Author: Eric Lippert Date: 08/20/2009
Four switch oddities
The C# switch statement is a bit weird. Today, four quick takes on things you probably didn't know...
Author: Eric Lippert Date: 08/13/2009
Precedence vs order, redux
Once more I'm revisting the myth that order of evaluation has any relationship to operator...
Author: Eric Lippert Date: 08/10/2009
Not everything derives from object
I hear a lot of myths about C#. Usually the myths have some germ of truth to them, like "value types...
Author: Eric Lippert Date: 08/06/2009
What's The Difference, Part Two: Scope vs Declaration Space vs Lifetime
"Scope" has got to be one of the most confusing words in all of programming language design. People...
Author: Eric Lippert Date: 08/03/2009
What's the difference, part one: Generics are not templates
Because I'm a geek, I enjoy learning about the sometimes-subtle differences between easily-confused...
Author: Eric Lippert Date: 07/30/2009
Iterator Blocks, Part Six: Why no unsafe code?
There are three good reasons to disallow unsafe blocks inside an iterator block. First, it is an...
Author: Eric Lippert Date: 07/27/2009
Iterator Blocks, Part Five: Push vs Pull
A while back I posted some commentary I did for the Scripting Summer Games where I noted that there...
Author: Eric Lippert Date: 07/23/2009
Iterator Blocks, Part Two: Why no ref or out parameters?
A long and detailed discussion of how exactly we implement iterator blocks would take me quite a...
Author: Eric Lippert Date: 07/13/2009
Iterator Blocks, Part One
There is a constant tension in language design between solving general problems and solving specific...
Author: Eric Lippert Date: 07/09/2009