什么新在C#4静态类型的家伙静态、家伙、类型

2023-09-07 12:54:34 作者:有你亲爹那范er。

首先让我说,我知道的有关动态,无PIA,命名和可选参数,最后协变和逆变。

first of all let me say that I know about dynamic, no PIA, named and optional parameters and finally covariance and contravariance.

在我的项目中99%的时间我的code是在C#中,我几乎没做办公自动化,我不打算在短期内使用任何动态语言,除了是必要的办公自动化,我想命名和可选参数是错误的(没有,过载不计,如果你有很多重载的问题是在设计,不是语言)。

In my projects 99% of the time my code is in C#, I almost never do Office automation, I don't plan to use any dynamic language any time soon, and, besides being necessary for Office automation, I think named and optional parameters are wrong (and no, overloads do not count, if you have that many overloads the problem is in the design, not the language).

那么什么有一个C#的家伙在静态类型的世界?出现的唯一的事情是协变和逆变,这听起来不错,但我希望更多的东西。我很高兴能尝试的唯一位是平行扩展LINQ的,但仅此而已(这就是[可供3.5 作为一个CTP )。

So whats there for a C# guy in a static-typed world?, The only thing appears to be covariance and contravariance, which sounds great, but I was hoping something more. The only bits that I'm excited to try are the parallel extensions for Linq but that's about it (and that's [available for 3.5 as a CTP).

你为什么要退出关于C#4?

Why are you exited about C# 4?

推荐答案

值得兴奋的在C#4从非COM,非动态的角度来看的唯一的事情是协变和逆变。其他的一切都是围绕动态类型。

The only thing to be excited about in C# 4 from a non-COM, non-dynamic standpoint are covariance and contravariance. Everything else is centered around dynamic typing.