On Oct 28, 5:50*pm, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
wrote:
> I don't think the variance changes are too specialised. *Support for coand
> counter variance where appropriate will be very welcome.
Actually, I highly suspect that they will be only used in a few
fundamental interfaces such as IEnumerable, IComparable and
IEquatable. Declaration-site variance is of somewhat limited utility,
because too many useful interfaces are neither covariant nor
contravariant as such, even though they can be used in either fashion,
depending on what needs to be done with them (such as IList - indexer
is covariant, Add() is contravariant, and plenty of methods only use
one but not the other). Usage-site variance, a la Java, is much more
permissive.
> I also expect to see much great take up of COM interop with this version.*I
> for one have kept COM interop and arms length, but it would seem that MS
> have come to accept and even re-embrace COM as something that is still here
> to stay for a long time.
Yes, this was a bit of a puzzler, really. I would've expected
migration of existing COM-only APIs to native (at least to the
immediate client) .NET ones, but it seems they chose to improve
interop instead.
> Optional Parameters and overload resolution looks a bit messy. *An example
> given is:-
>
> M(int i, string s = "Hello");
> M(int i);
>
> M(5);
>
> In this example M(int i) is the winner. *That being the case the only way I
> can see the former overload getting called is:
>
> M(5, s
Well, it is obviously a corner case, and a harmless one at that.
Overloading rules for optional arguments are actually quite sensible,
and follow the guidelines established for varargs/params.
> Its wierd enough that parameter identifiers have become significant (not
> just the types and parameter order) but the above is even stranger.
Parameter identifiers were always significant in .NET as a whole,
since they are part of public signatures, and since at least one other
MS language (that is, VB.NET) had named arguments since version 1.
> Interesting hints in the document RE HTML DOM using IDynamicObject? *What
> does that mean? *Is there some deep hidden project that has HTML DOM
> implemented on the DLR? *Perhaps I'm reading too much into it.
I think it's just an example of what can be done. What they're
probably referring to is the way you can walk HTML DOM in JavaScript
in a browser - you know, using element names as properties. So <div
name="foo"><div name="bar"/></div> becomes document.foo.bar.