c ++的生存 [英] survival of c++

查看:73
本文介绍了c ++的生存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用C ++。它灵活高效。但是它不是因为硬件运行时语言生存的原因

领先于这些功能软件(为什么效率?)。Java是一种很酷的

语言,.NET也适用于移动设备和嵌入式

系统。任何人都可以提供一些有效的理由让我可以理解并且

C ++将在未来几年中存活下来。

解决方案

jimmy写道:

我目前正在使用C ++。它灵活高效。但是,这并不是因为硬件在软件运行之前能够生存的原因(为什么要提高效率?)Java是一个存在的原因。即使对于移动设备和嵌入式系统,语言和.NET也很酷。任何人都可以给出一些有效的理由,以便我能够理解并且未来几年C ++能够存活下来。




这里有用的信息是re是即将推出的标准

C ++ / CLI扩展。

以下是我在另一个新闻组中发送的消息的一部分:


今天在使用C ++的.NET中我们以这种方式工作:

__gc类什么

{

// ...

};

//相当于* p = __ gc新的任何东西;

无论什么* p =新的任何东西;

//非GC堆中的托管类型

无论是什么* p = __ nogc新的东西;

类什么

{

// ...

};


//这里没有收集垃圾

无论* p = new无论如何;


使用新语法:

ref class whatever

{

//。 ..

};

无论^ p = gcnew是什么;

//这将是非GC堆中的托管类型

无论什么* p =新的任何东西;


也有可能:

//堆栈中的GC对象(就像它一样工作) 。

//它在最后被销毁o其范围

//(确定性最终确定)

无论x;


C ++ / CLI *更自然。


使用C ++可以做比C#更多的事情,因为你可以在管理和非托管的世界中工作



C ++ / CLI不替代ISO C ++,它是ISO C ++的一组扩展。


也可以使用ISO C ++ for .NET应用程序(我做!)。我在混合模式下编程

,这是关于C ++代码重新编译的最有效和最便携的可移植性

。我并不关心将编译后的.exe移植到另一个平台上的原因,因为它原来并不是便携式的。


我会考虑限制使用C ++ / CLI,只有当我想要使用其他.NET语言访问我的

接口时才会使用,而定义

本身有不是纯粹的C ++ / CLI。这是只有C ++才有的灵活性。


例如,你可以轻松地将std :: string转换为String *。

C ++优于C#!


问候,


Ioannis Vranos

http://www23.brinkster.com/noicys


"麦" <ジ************** @ hotmail.com>在消息中写道

news:35 ************************** @ posting.google.c om ...

我目前正在使用C ++。它灵活高效。但这并不是因为硬件在运行软件的能力之前能够生存的语言的原因(为什么效率?)。Java对于移动设备和嵌入式系统来说也是一种很酷的语言和.NET。任何人都可以给出一些有效的理由让我能够理解并且C ++能够在未来几年。




老实说这并不重要。在很长一段时间内,主导语言将很可能是一个非常像C ++的语言,即使C ++不是完全正确的。证人:Java。 Java基本上是C ++,带有垃圾收集器

并指出wazoo。在任何情况下,你编程的越多,你练习的b
越多,准备好你将来会出现的任何类型的编程

,所以它不是真的很重要

语言。


学生的话。


Aguilar,James发布:

" jimmy" <ジ************** @ hotmail.com>在消息中写道
新闻:35 ************************** @ posting.google.c om ...

我目前正在使用C ++。它非常灵活且效率高达b $ b。但这并不是因为硬件
提前运行软件的能力(为什么效率?)这种语言生存的原因。 .Java
是一种很酷的语言,.NET甚至对于移动设备和
嵌入式系统也是如此。任何人都可以给出一些有效的理由,这样我就可以理解I
,并且C ++将在未来几年中存活下来。老实说,这并不重要。



主导语言很可能很长一段时间就像C ++一样来到
,即使C ++并不完全正确。证人:Java。 Java基本上是C ++
,带有垃圾收集器并指出了wazoo。在任何情况下,
你编程的越多,你练习的越多,你准备好的
将来会出现在任何类型的编程中,所以
它不是真的_that_重要的是它是什么语言。

学生的话。



为什么人们用垃圾做出这么大的交易

收藏?!您可以使用类在C ++中完成它。


-JKop


I am presently working in C++ .It is flexible and efficient.But it is
not the reasons for the language to survive as hardware is running
ahead the capabilities of software(why efficiency?).Java is a cool
language and .NET too even for mobile devices and embedded
systems.Anybody can give some valid reasons so that I can understaand
C++ will survive in the coming years.

解决方案

jimmy wrote:

I am presently working in C++ .It is flexible and efficient.But it is
not the reasons for the language to survive as hardware is running
ahead the capabilities of software(why efficiency?).Java is a cool
language and .NET too even for mobile devices and embedded
systems.Anybody can give some valid reasons so that I can understaand
C++ will survive in the coming years.



A useful information here is that there is an upcoming standard for
C++/CLI extensions.
Here are parts of a message I sent in another newsgroup:


Today in .NET with C++ we work in this way:
__gc class whatever
{
// ...
};
// Equivalent to whatever *p=__gc new whatever;
whatever *p=new whatever;
// Managed type in non GC heap
whatever *p=__nogc new whatever;
class whatever
{
// ...
};

// Here not garbage collected
whatever *p=new whatever;

With the new syntax:
ref class whatever
{
// ...
};
whatever ^p=gcnew whatever;
// This will be managed type in non GC heap
whatever *p=new whatever;

Also it is possible:
// GC object (working as if it is) in the stack.
// It is destroyed at the end of its scope
// (deterministic finalisation)
whatever x;

C++/CLI *is* more natural.

With C++ it is possible to do more things than with C#, since you can
work in the managed and unmanaged worlds combined.

C++/CLI does not replace ISO C++, it is a set of extensions to ISO C++.

One can also use ISO C++ for .NET applications (I do!). I am programming
in mixed mode, which is the most efficient and portable - portability
regarding C++ code recompiling only. I do not care for portability of
the compiled .exe to another platform as it is, since the API is not
portable anyway.

I will consider C++/CLI restricted use, only when I will want to make my
interfaces accessible in other .NET languages, while the definitions
themselves have not be in pure "C++/CLI". This is the kind of
flexibility only C++ has.

For example you can make a std::string to String * conversion easily.
C++ is better than C#!


Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys


"jimmy" <ji**************@hotmail.com> wrote in message
news:35**************************@posting.google.c om...

I am presently working in C++ .It is flexible and efficient.But it is
not the reasons for the language to survive as hardware is running
ahead the capabilities of software(why efficiency?).Java is a cool
language and .NET too even for mobile devices and embedded
systems.Anybody can give some valid reasons so that I can understaand
C++ will survive in the coming years.



It honestly doesn''t really matter that much. The dominant language will
probably be one very like C++ for a long time to come, even if C++ isn''t
exactly it. Witness: Java. Java is basically C++ with a garbage collector
and pointers out the wazoo. In any case, the more you program, and the more
you practice, the better prepared you will be for any type of programming
that comes up in the future, so it is not really _that_ important what
language it is in.

The words of a student.


Aguilar, James posted:

"jimmy" <ji**************@hotmail.com> wrote in message
news:35**************************@posting.google.c om...

I am presently working in C++ .It is flexible and efficient.But it is not the reasons for the language to survive as hardware is running ahead the capabilities of software(why efficiency?).Java is a cool language and .NET too even for mobile devices and embedded systems.Anybody can give some valid reasons so that I can understaand C++ will survive in the coming years.
It honestly doesn''t really matter that much. The


dominant language will probably be one very like C++ for a long time to come, even if C++ isn''t exactly it. Witness: Java. Java is basically C++ with a garbage collector and pointers out the wazoo. In any case, the more you program, and the more you practice, the better prepared you will be for any type of programming that comes up in the future, so it is not really _that_ important what language it is in.

The words of a student.


Why are people making such a big deal out of garbage
collection?! You can use a class to do it in C++.

-JKop


这篇关于c ++的生存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆