via @HamletDRC
Ever since I started playing around with Boo this is exactly how I feel about declaring types for my variables…
C#
IFoo foo = (IFoo)Fetch(arg);
Boo
foo = Fetch(arg) as IFoo
IFoo only ever needs to be written once on any given line. And if Fetch returned IFoo it wouldn’t need to be written at all. Being explicit is great and all, but being redundant is absolutely not.
You must log in to post a comment.