Browse by Tags

Tagged Content List
  • Blog Post: Is C# a strongly typed or a weakly typed language?

    Presented as a dialogue, as is my wont! Is C# a strongly typed or a weakly typed language? Yes. That is unhelpful. I don't doubt it. Interestingly, if you rephrased the question as an "and" question, the answer would be the same. What? You mean, is C# a strongly typed and a weakly typed...
  • Blog Post: What is this thing you call a "type"? Part Two

    Well that was entirely predictable; as I said last time , if you ask ten developers for a definition of "type", you get ten different answers. The comments to the previous article make for fascinating reading! Here's my attempt at describing what "type" means to me as a compiler writer. I want to...
  • Blog Post: What is this thing you call a "type"? Part one

    (Eric is out camping; this posting is prerecorded. I'll be back in the office after Labour Day.) The word "type" appears almost five thousand times in the C# 4 specification, and there is an entire chapter, chapter 4, dedicated to nothing but describing types. We start the specification by noting...
  • Blog Post: Curiouser and curiouser

    Here's a pattern you see all the time in C#: class Frob : IComparable<Frob> At first glance you might ask yourself why this is not a "circular" definition; after all, you're not allowed to say " class Frob : Frob "(*). However, upon deeper reflection that makes perfect sense; a Frob is something...
  • Blog Post: 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 pass an expression of type X or something convertible to X . Say, an expression of a type derived from X. But if you have a method that takes a "ref X", you have to pass a ref to a variable of type...
Page 1 of 1 (5 items)