According to a post by Stephen Toub (MSFT), they are assuming that we are going to rely on closures to pass state data. There was also some excuse about signature ambiguity. (http://social.msdn.microsoft.com/Forums/en/parallelextensions/thread/1988294c-de41-476a-a104-aa550b7409f5)
However, relying on closures to solve this problem seems like a temporary hack waiting for a better solution. It works, but it's not a good longer-term solution. There are many times that simply specifying a delegate method as the action would be the simplest approach, but that means we have to use global vars or we're excluded from state parameter passing.
I like one of Hugo's proposals (from the MS forum posting). Hugo suggested introducing a TaskState type, which seems like a clever way to circumvent the generics ambiguity issue.
Applying this to the Task.Factory.StartNew() signature and the Task() constructor as such:
public Task<T>( Action<T> function, TaskState<T> state );
public Task<T,TResult>( Func<T,TResult> function, TaskState<T> state );
ActionState would be a lot like the Nullable class -- just a simple wrapper around a Value member. In practice, using TaskState might look like this:
var myTask = new Task( MyMethod, new TaskState( stateInfo ) );
...
public void MyMethod( StateInfo stateInfo ) { ... }
The TaskState<> solution is not perfect, but it seems like a much better solution than relying on closure of type casting.