Friday, October 26, 2007

Reflection joke

In the spirit of Steve Yegge's Kingdom of Nouns, Scott Bellware pokes fun at the .Net reflection API compared to Ruby's:

I say :tomato
You say typeof(Fruit).GetField('tomato', BindingFlags.Instance | BindingFlags.Public)

I say :potato
You say typeof(Tuber).GetField('potato', BindingFlags.Instance | BindingFlags.Public)

:tomato
typeof(Fruit).GetField('tomato', BindingFlags.Instance | BindingFlags.Public)

:potato
typeof(Tuber).GetField('potato', BindingFlags.Instance | BindingFlags.Public)

Let's call the whole thing off

Priceless! Be sure to read the comments on Scott's post.

No comments: