Monthly Archives: March 2007

Better Type Inferencing including the use of “var’ key word which macro-ishly rewrites to the type of object you assign to it. This is also the case with Arrays which now do not need explicit type declarations

Notice that our first parameter must be a type definition for the object we are wanting to extend.

Lambda expressions which in C# 3.0 seem to be mostly better syntax for anonymous delegates with outer variable capture(sic). For some reason they thought that the ADwOVC were a little verbose for the task at hand, and were not quite enough like LISP lambdas.

x => x + 1 // Implicitly typed, expression body

x => { return x + 1; } // Implicitly typed, statement body

(int x) => x + 1 // Explicitly typed, expression body

(int x) => { return x + 1; } // Explicitly typed, statement body

(x, y) => x * y // Multiple parameters

() => Console.WriteLine() // No parameters(Yay Thunk!)

Query Expression / LINQ: This is a big, so I am only going to cover it briefly. The goal of this is to allow set processing language in your C# program. It will convert a “Query Expression” into a series of function calls that will operate on a set of data. There is a ton more information about this out on the web if it piques your interest.

Expression Trees (from the spec): permit lambda expressions to be represented as data structures instead of executable code. Expression trees are efficient in-memory data representations of lambda expressions and make the structure of the expression transparent and explicit. While this certainly sounds interesting I wish they would have spent more than a paragraph on it in the language spec. My guess is that this is mostly in there to support what LINQ is doing more than that this was intended for end user use much. It is possible though that this would allow for macros expressed as operations on an Expression Tree. It also seems to backdoor in runtime evaluation.

The final result is that C# 3 is still static all over the damn place, but hey… they are working on it. Maybe version 4 will have a regular old eval function (hehehe)

I am writing to urge you to support the Restoring the Constitution act of 2007. Your vote of support for the Military Commissions Act of 2006 was, in my opinion, the low point of your senatorial career. You can work to undue the harm that was caused by this act, by voting now to support the reinstatement of habeas corpus and by declaring that we are a land of free people, not a police state.

As stated in a previous email to this office, I do not in anyway, ever, support torture. Working to make that the official stance of the United States government, is incredibly important to me. From what I understand of the Restoring The Constitution Act of 2007, it would bring us back to the sound principles of treating everyone fairly and without torture, and force us to comply with our foreign obligations under the Geneva Convention.

I have read that nearly 400 men continue to be held indefinitely and without charge at Guantanamo Bay, and that a good many of them are provably innocent. Please allow due process to help these individuals see some form of justice.