Programming without Types

Warning, actual serious content.  This is not a joke.  Repeat, this is not a joke.

I don't want to get rid of types. I just don't want to have to explicitly say them all the time.  I want more type inference in the language.  Again, this is not some lead in to another silly post making fun of type inference.  I actually like type inference to some degree.  I want more of it.

Where do I want it?  First off, I want it in my foreach statement.  Why do I have to specifically call out the type of my iteration variable.  I should be able to deduce it from the collection.  Sure, back in olden days of .Net you could not determine the appropriate element type unless you had written up a special collection class with a special strongly-typed enumerator.  But now, in the next release everything is generics.  You've got generic interfaces for IEnumerable/IEnumerator.  They always know the element type, always.  So, foreach, my friend, why do I still have to re-state the element type?

Instead of:     foreach(Foo f in foos) { ... }

Why not:       foreach(f in foos) { ... }

The local 'f' is still strongly typed.

Better right?  Well, I did after all convert the X# compiler to work this way.  Maybe one day you'll see it in C-omega, whenever that research compiler finds it way into the wild.  It would be fantastic, IMO, if C# could do this.

Where else would you get rid of typing the type in C#, if you could?

Matt