将.NET接手C / C ++任何时候?时候、NET

2023-09-03 09:43:49 作者:②④K、纯屌丝

这是一个主观的问题。

我曾在Visual Basic 6.0窜进.NET空间之前。

I worked in Visual Basic 6.0 before coming into the .NET space.

一件事,我看到有很多的东西,其中有一个需要处理的Win32 API的。作为一个Visual Basic 6.0的开发,有很大的局限性。 .NET解决一些老问题,但需要依靠Win32上还没有得到照顾。

One thing I see that there are a lot of things, for which there is a need to deal with the Win32 API. As a Visual Basic 6.0 developer, there were a lot of limitations. .NET fixes some of the old problems however the need to rely on Win32 has not been taken care of.

会不会有随时有不会是需要依靠的Win32? (我想,只有当.NET的支撑位在操作系统级别。)

Will there be anytime that there wouldn't be the need to rely on Win32? (I guess only when .NET has support at OS level.)

据我了解.NET(写 LOB 应用程序/网站)和C / C的域++不同的是,到目前为止。

I understand that domain of .NET (writing LOB applications/websites) and C/C++ is different so far.

能否.NET或任何其他基础设施真正使C / C ++少显著? 难道我期望太高了?

Can .NET or any other infrastructure really make C/C++ less significant? Am I expecting too much?

编辑:不看起来像,建筑包装在另一个包装(并带来新的一套沿与它的复杂性)

Doesn't it look like, building wrapper over another wrapper (and bring in new set of complexities along-with it)?

推荐答案

它可以在任何时候不能很快消失,但在Windows,至少,新的项目会越来越少,用C / C ++。你甚至可以看到微软的例子开始吃自己的狗粮。

It can't go away any time soon, but in Windows, at least, new projects are going less and less with C/C++. You can even see examples of Microsoft starting to eat their own dog food.

这方面的一个很好的例子是C#编译器。目前,它是用C / C ++。 C#的团队目前正在重新编写纯粹的管理code。一个很大的原因,是因为有在.NET CAS政策。调用非托管code要求FullTrust的,所以编译code也需要FullTrust的。当他们将转移到管理code,这个限制就会消失。

A great example of this is the C# compiler. Currently, it is written in C/C++. The C# team is currently working on re-writing it purely in managed code. A big reason for this has to do with CAS policies in .NET. Invoking unmanaged code requires FullTrust, so compiling code also requires FullTrust. As they move over to managed code, this limitation goes away.

随着越来越多的开发商进入到.NET作为他们的开发平台,我们看到微软效仿。

As more and more developers go to .NET as their development platform, we are seeing Microsoft follow suit.

另一个很好的例子是Visual Studio 2010中它们被重写使用WPF和MEF使得它很容易扩展IDE的大部分。

Another great example is Visual Studio 2010. They are re-writing large portions of the IDE using WPF and MEF so that it is easily extensible.

接下来,看Silverlight运行时。它不依赖(尤其是)在Win32的。它运行在Mac上一样好,因为它运行在Windows上。随着Silverlight中变得更强大,我们可能会发现许多与目前依靠的Win32的.NET电话再也不能这样做。

Next, look at the Silverlight runtime. It doesn't rely (specifically) on Win32 at all. It runs on a Mac just as well as it runs on Windows. As Silverlight becomes more capable, we may find many of the .NET calls that currently rely on Win32 no longer do so.

我想我的观点是,我们开始看到至少有一些变化的在Windows世界。

I guess my point is that we ARE starting to see some changes in the Windows world at least.

当然,只要你需要更多的跨平台,C / C ++变得更有吸引力了...

Of course, as soon as you need to be more cross-platform, C/C++ becomes more appealing again...