C++的现状和未来
作者:贾斯汀·詹姆斯
翻译:PurpleEndurer,2009-07-10 第1版
分类:编程语言
标签:开发人员,C++,C/C++,编程语言,软件开发,软件/网站开发,Justin James
来看看贾斯汀·詹姆斯为什么认为具有良好工作能力的C++开发人员有很大的潜力罢。
———————————————————————————————
TechRepublic成员Oleg F(一名有经验的C++开发人员)询问我对C++的现在和未来的看法。此外,他需要C++如何适应.NET平台,网站开发,以及云计算的信息。我的回复如下:
我认为对大多数开发人员来说,C++作为通用编程语言的时代正快速走向终结。C++仍然有许多用武之地,特别是操作系统级工作,低层工作(嵌入设备,设备驱动程序等等),某些高性能应用程序,而像.NET或Java这样的架空系统上的应用程序太大了(像一个办公软件套装)。一些开发人员仍然继续使用C++开发其它不太复杂的语言也能处理的应用程序。但对典型程序员而言,C++是要为极小改进而挠破头皮的东东。
多数开发人员面临的性能问题不是转移到本地代码就能解决的那种问题;一旦你偏向性能,在大多数情况下C++是一个相当具吸引力的应用程序开发选择。
我所讨论的一些开发人员说在.NET管理环境中使用C++不是特别有吸引力;这减少了许多在Web开发中使用它的机会,除非你想在CGI模式中使用它。关于CGI有好(开销小,简单概念模型)有坏(你的应用程序不得不留意许多更低级的任务)。就我所闻,在.NET CLR,C++丧失了速度优势以及许多让C++更有用的东西。
这并不是说C++末路不远。我认为 C++ 加入了COBOL 和 FORTRAN 的行列,作为具有大量安装基数的传统语言,需要有人维护和扩展现存应用程序50年以上。另外,由于大量的原因,许多新的开发项目将用它来启动(熟悉,支持库,传统/习惯,文化,等等)。我也怀疑它会作为已“亡”语言(像COBOL)重拾荣耀,因为议论和宣传比非使用率少得多(也与COBOL类似)。
我不想使C++的未来听起来令人感觉暗淡;如果有什么的话,我认为具有良好工作能力的C++开发人员有很大的潜力。如果你是C++开发人员,我建议你坚持用这个语言。你正在做的事情耀眼,或获得了与Web应用程序在主流出版物上的同样的关注吗?没有。但按当前薪水结构,我觉得有经验的C++开发人员将暂时拿到很丰厚的工资。另外,因为剩余的C++工作是高难度的,并且学习C++的人少了(现在的大学中教它不是很多),我希望C++开发人员能有更多的就业保障,和比 .NET 或 Java开发人员更好的长期补助。
尽管在Web开发中C++任何时候都不大可能成为主流,并且用C++开发桌面应用程序也少于平时,但我认为C++在云计算的某些方面有许多上乘机会。对一些项目(想想那些很适合超级计算机的人),“云”给C++开发人员提供了一条路,来得到与网格计算相同的益处,但有更多的灵活性。这些项目和适合使用C++的开发人员的项目类型中有许多相互重叠的。因此,我认为云计算将会在许多项目中取代或补充网格和超级计算机,并提供了一个以崭新和创新的方法使用C++的极好机会。
请记住,这些分析大部分的重点是Windows领域。就从我看到的来说,*nix开发社区仍然是非常倾向C/C++。 关心Windows中机会减少的C++开发人员一定要来看看* nix中的发展。
我相信C++将慢慢隐退到后台,但它不会消亡也不会永远变得无足轻重。尽管我所知的绝大部分开发人从未在真实世界中接触过C++,但许多开发人员将会从学习它中受益,即使仅仅为了增进对包括Java,.NET和Ruby在内的各种语言的一些认知。
英文出处:http://blogs.techrepublic.com.com/programming-and-development/?p=1372&tag=nl.e055
The current state and future of C++
Author: Justin James
Category: Programming Languages
Tags: Developer, C++, C/C++, Programming Languages, Software Development, Software/Web Development, Justin James
Find out why Justin James thinks there is still great potential for C++ developers to do quite nicely for themselves.
———————————————————————————————
TechRepublic member Oleg F (an experienced C++ developer) asked for my thoughts on the “present and future” of C++. In addition, he wanted information on how C++ fits into the .NET universe, Web development, and cloud computing. Below is my response.
I believe the days of C++ as a general purpose programming language are quickly ending for most developers. There are still lots of great uses for C++, particularly for OS-level work, low-level work (embedded devices, device drivers, etc.), certain high-performance applications, and applications where the overhead of a system like .NET or Java would be too heavy (like an office suite). Some developers will continue to use C++ for applications that other, less complex languages can handle as well. But for the typical developer, C++ is a big headache for minimal gain.
The performance issues that most developers face are not the kinds of issues that moving to native code will resolve; once you take performance out of the equation, C++ is a fairly unattractive option for application development in most cases.
The handful of C++ developers that I’ve talked to say using C++ in the .NET managed environment is not particularly attractive to them; this takes away much of the opportunity to use it in a Web development capacity, unless you want to use it in the CGI model. There are good things about CGI (less overhead, simple conceptual model) and bad things about CGI (your application has to be “aware” of many more low-level tasks). From what I’ve heard, under the .NET CLR, C++ loses its speed, as well as many of the things that make C++ useful.
This is not to say that C++ is going away any time soon. I see C++ joining the ranks of COBOL and FORTRAN as a legacy language with a massive installation base and a need for people to maintain/extend existing applications for more than 50 years. In addition, a number of new development projects will be started in it for a variety of reasons (familiarity, library support, tradition/habit, cultural, etc.). I also suspect that it will pick up a reputation as a “dead” language (again, like COBOL), due more to a lack of buzz and hype than actual non-usage (also like COBOL).
I don’t want to make the future for C++ sound dismal; if anything, I think there is great potential for C++ developers to do quite nicely for themselves. If you’re a C++ developer, I suggest that you stick with the language. Are the things you’re working on flashy or get the same attention as Web applications in the mainstream publications? No. But with the current salary structures, I feel that experienced C++ developers will see very nice paychecks for some time. In addition, as the remaining C++ work is of higher difficulty and fewer people learn C++ (it isn’t taught as frequently in colleges these days), I expect C++ developers to have more job security and better compensation than .NET or Java developers over the long run.
While C++ in Web development is not likely to become mainstream any time soon and desktop application development in C++ becomes less common, I think there is a lot of upside opportunity for C++ in certain aspects of cloud computing. For some projects (think of ones that are well suited to supercomputers), the cloud offers C++ developers a way to get the same benefits of grid computing but with much more flexibility. There is a lot of overlap between those projects and the kinds of projects for which developers regularly use C++. As a result, I think cloud computing will replace or supplement grids and supercomputers in many projects and will provide an excellent opportunity to see C++ used in new and innovative ways.
《endurer注:any time soon:不久的任何时候
in certain aspect:在某方面》
Keep in mind that much of this analysis is focused on the Windows world. From what I see, the *Nix development community is still very C/C++ oriented. C++ developers who are concerned about dwindling opportunities in Windows should definitely take a look at *Nix development.
I believe that C++ will slowly fade into the background, but it will neither die nor will it ever become unimportant. While most developers I know have never touched C++ in a real-world environment, many developers would benefit from learning it, if only to gain some appreciation of various languages, including Java, .NET, and Ruby.
《endurer注:if only to即使仅仅因为》
If you have a programming question, e-mail it to me by clicking the Contact link at the top of the Programming and Development blog header.
J.Ja
Disclosure of Justin’s industry affiliations:Justin James has a working arrangement with Microsoft to write an article forMSDN Magazine. He also has a contract with Spiceworks to write product buying guides.