One reason why Gyro rocks
If anyone saw Don Box's post today on delegates being the monikers of .NET (excellent article by the way), they may have seen a preview into the future. Check out the code sample from Don's article:
public sealed class Tester2 {
static IEnumerable<object> Generate(Predicate p) {
List<object> list = new List<object>();
foreach (object o in MyGoop) {
if (p(o))
list.Add(o);
}
return list;
}
}
Anyone see the cool template code? If you've never used templates in C++ or
Gyro, they are designated by the <> after a type reference. Very cool! I've been messing with
Gyro for a while now, primarilly because I know it's the working draft for templates in Whidby. I can't wait for templates in C#. I am so sick of casting and writing "collection classes". Whoo Hoo!!!!!