As you might have gathered from the number of times I make a blog post beginning with “I got the following question from a reader the other day…” I field a lot of questions about the C# language (and in the past fielded a lot of questions about VBScript and JScript.) Each of them is, by definition, about something that was unobvious about the language; if it were obvious, the question wouldn’t have been asked in the first place.
This means that I always learn something when I answer questions. I learn what it is about this language that people find confusing, unobvious, tricky. These are useful data, because we can then use them to make better compiler warnings. We can use them to help us gauge early on what new language features people will find confusing. And so on.
Rather than wait for more questions to come in — though believe me, plenty do — I thought I’d take this opportunity to solicit stories of times when you learned something profoundly non-intuitive about programming languages. Preferably C#, but other languages would be interesting as well. If you’ve got a story to share, please leave a comment on the blog or send me an email. Thanks!