Wackiness ensues

No tech today, but this is too funny to not pass along, so consider this your fun for Friday. What would happen if Anders Hejlsberg and Barbara Liskov were forced to share an apartment in an “odd couple” sitcom? (*) Apparently I’m the “Kramer” of this sitcom. I hope I’m played by Ryan Gosling. Additional…

8

He's So Dreamy

Happy New Year all! It has just been brought to my attention that this blog and the Programmer Ryan Gosling photo blog share at least one reader: I admit it, I LOL’d. In the interests of total accuracy I’d like to point out that the first entry on the blog contains a subtle error: .NET…

5

Funniest Hungarian Joke Ever

I’m back from my fabulous adventures in Austria, Romania and Canada and I had a fabulous time, as you might imagine. We were in Romania for a wedding of some close personal friends who live here in Seattle; much of the groom’s family escaped from Romania during the Communist period and settled in Austria, so…

21

Compound Assignment, Part Two

Last time I discussed how the compound assignment operators of the form “x op= y” have some perhaps unobvious behaviours in C#, namely: (1) though logically this is expanded as “x = x op y”, x is only evaluated once(2) for built-in operators, if necessary, a cast is inserted, so that this is analyzed as…

54

Hiring for Roslyn

A couple years ago I made a blog posting called “The Managed Languages Team Is Hiring” mere hours before our senior management announced that our hiring goals had been met and told me to please stop recruiting people. That was a little embarrassing. This time I have been assured that, really truly, we do have…

14

Some Last-Minute New C# 4.0 Features

As I’m sure you know by now, we are done implementing C# 4. We’ve added support for interoperability with dynamic languages and legacy object models, named and optional parameters, the ability to “link” against interfaces from a Primary Interop Assembly, and my favourite feature, covariance and contravariance of interface and delegate types. Now, sometimes we…

51

A twist of lemon

I was browsing the archive of design notes from the early days of the C# language the other day. Apparently whoever was editing the notes back then had a sense of humour. (UPDATE: It was Scott, just as I suspected.) I stumbled across this note from May 1999: We considered a proposal to rename short,…

25

First Cousins Once Removed

Happy New Year all, and welcome to 2010, or, as my friend Professor Orbifold prefers it, MMX. I hope your festive holiday season was as festive and enjoyable as mine. The extended Lippert family continues to grow; this year at the annual Boxing Day party we needed two overflow tables for dinner instead of the…

28

It's the most wonderful time of the year

Here’s a little holiday cheer for you all. Or, at least for you all in Commonwealth countries. static object M<T>(T t) where T : struct{  return t;} int ii = 10;int? jj = 20;object xx = ii;object yy = jj;System.ValueType zz = ii;IComparable aa = ii;System.Enum bb = MidpointRounding.ToEven;object cc = M(ii); I hope you’re having…

7

Every Problem Looks Like A Nail

I wish all the questions I got were this straightforward: “I need to compare two strings for non-culture-sensitive equality. I notice that there are methods String.Equals and String.Compare which can both do that. What is the guideline on which one I should use?” I’ll answer your question, but first, a funny story (*). My buddy…

14