c++讨论会 永远不要相信那些自称懂C++的程序员 (Never trust a programmer who says h

Never trust a programmer who says he knows C++
2010年03月31日 星期三 10:04

I’ve been in an interviewing mindset for awhile and I’ve come to realize something important about C++ in particular. C++ is a “two peak” language. That is to say C++ is the only language I know of where two very different sets of programmers consider themselves well versed in the language. Let me show you in fake graph form:

 

Programmers (especially those coming from C) can very quickly get up to speed in C++ and feel quite proficient. These programmers will tell you that they know C++. They are lying. As a programmer continues in C++, he goes through this valley of frustration where he fully comes to terms with the full complexity of the language. The good news is that it’s really easy to tell the difference between C++ programmers pre- and post- valley (in an interview, in this case). Just mention that C++ is an extremely large and complex language, and the post-valley people will give you 127 different tiny frustrations they have with the language. The pre-valley people will say “Yea, I guess. I mean, it’s just C with classes.”.


 


翻译:近日,国外技术博客lbrady.com 发表了一篇非常有意思的博文。文章认为C++语言庞大而复杂,只有那些在c++开发之旅上吃过许多苦头的程序员才能真正的了解C++。显然作者受到一些刺激,他的博文名称为“永远不要相信那些自称懂C++的程序员(Never trust a programmer who says he knows C++)”。原文如下:

经过一段长时间的面试工作后,我意识到一个非常重要的关于C++的问题,那就是C++是个“严重两极化"的程序语言。我的意思是:C++是唯一一个完全不同的两类使用者都自称精通,却对它的理解大相径庭的语言。让我用下面这个图示说明。

图注:(自左向右,自上而下,所标文字为各阶段程序员对C++的认知。分别是:带类的C语言、那些模板报错信息真令人发狂、引用类型太不可捉摸了、到底啥是虚析构函数?这些异常说明符比Java的差、静态对象初始化段错误、我们需要一些规则。)

一般的程序员(特别有C语言基础的)都可以很快上手C++开发,并且感到挺熟练。如果是这样的程序员说他很懂C++,那他肯定在撒谎。因为当他继续在C++开发之路走下去时,他就会经历上图下曲线上标注的所有挫折,而后他就会认识到C++是一个多么复杂的语言。在面试中,这带来了一个优点(至少对面试官而言):很容易辨别哪些是经历过这些挫折,哪些没有。只要你提及C++真是一个变态的复杂语言时,挫折经历后的同学就会向你抱怨,他们在使用C++时遇到的127个小问题。而没有经历过的同学就会说:“安啦,那不就是带有类的C语言嘛?”(杨东杰编译)

你对C++语言的理解到了哪一步呢?
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值