New in C#4

Bruno Medeiros brunodomedeiros+spam at com.gmail
Fri Nov 7 10:58:35 PST 2008


bearophile wrote:
> Thanks to Reddit I have found a nice short document that lists some of the differences of C#4:
> https://docs.google.com/View?docid=dcj4xk6_17ffc7nmgv
> 

Hum, interesting how they tackled the covariance/contravariance problem 
in generics parameters. It's not as powerful as Java's generics (in Java 
you can have covariance and contravariance in a List-like interface), 
but it's also quite simpler, so it's an interesting compromise.

Hum, I wonder if we can implement a system anywhere like Java's generics 
in D. Could be possible, when we have opImplicitCast.

> They have added a dynamic invocation, useful if you want to implement a dynamic language (like IronPython, IronRuby, etc) on top of the dotnet. Object-C shows this is doable in a very C-like language, and the Boo language shows that in a statically typed language it can be useful to use a Duck type once in a while to reduce the "static type pressure". More info on this last concept in the Boo site.
> 

I'm usually quite a fan of hard, disciplined, static typing, but it's an 
interesting idea nonetheless. Wonder if it would be worth putting into D.

-- 
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list