论坛首页 海阔天空论坛

我的偶像之一对C++的看法

浏览 7560 次
精华帖 (9) :: 良好帖 (0) :: 灌水帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2010-02-10   最后修改:2010-02-10
icetortoise 写道
哈哈,Peter Seibel的这篇blog写得...让Ron Jeffries无地自容阿,

Peter Novig不愧是一代宗师阿...偶像偶像

http://www.gigamonkeys.com/blog/2009/10/05/coders-unit-testing.html


这算什么,用纸笔写Tex这种事情还有谁做得出来,我只能高呼千秋万代一统浆糊、万岁万岁万万岁

不过这等天赋我们是学不来的,只能老老实实写测试

这个帖子里面还有几位一开始都是不写测试的,但后来都开始写了,包括Peter Novig,但他的话很说到点子上去了


引用
Joe Armstrong, on the other hand, says he has moved toward a test-first development style recently:

Seibel: At the point that you start typing code, do you code top-down or bottom-up or middle-out?

Armstrong: Bottom up. I write a little bit and test it, write a little bit and test it. I’ve gone over to this writing test cases first, now. Unit testing. Just write the test cases and then write the code. I feel fairly confident that it works.

The only interviewee who touched directly on TDD versus other approaches was Peter Norvig. He said he does more unit testing than he used to and even said some nice things about TDD but pointed out:

It’s also important to know what you’re doing. When I wrote my Sudoku solver, some bloggers commented on that. They said, “Look at the contrast—here’s Norvig’s Sudoku thing and then there’s this other guy,” whose name I’ve forgotten, one of these test-driven design gurus. He starts off and he says, “Well, I’m going to do Sudoku and I’m going to have this class and first thing I’m going to do is write a bunch of tests.” But then he never got anywhere. He had five different blog posts and in each one he wrote a little bit more and wrote lots of tests but he never got anything working because he didn’t know how to solve the problem.

A bit later Norvig said:

Then bloggers were arguing back and forth about what this means. I don’t think it means much of anything—I think test-driven design is great. I do that a lot more than I used to do. But you can test all you want and if you don’t know how to approach the problem, you’re not going to get a solution.


Ron Jeffries是狂热分子,可以原谅
0 请登录后投票
   发表时间:2010-02-10  
其实最关键的问题是,ISO这个中央政.治局.干的事情实在太没谱.
0 请登录后投票
   发表时间:2010-02-10  
Trustno1 写道
其实最关键的问题是,ISO这个中央政.治局.干的事情实在太没谱.


政治在什么地方都是一样的
0 请登录后投票
   发表时间:2010-02-10  
0x被废以后,C++这个东西就无甚意义了.
原本我以为Concept好歹把Haskell的Class 系统实用化了.但是0X直接Cancel了.
没有任何卖点,没有任何卖点了亚.

0 请登录后投票
   发表时间:2010-02-10  
potian 写道
icetortoise 写道
哈哈,Peter Seibel的这篇blog写得...让Ron Jeffries无地自容阿,

Peter Novig不愧是一代宗师阿...偶像偶像

http://www.gigamonkeys.com/blog/2009/10/05/coders-unit-testing.html


这算什么,用纸笔写Tex这种事情还有谁做得出来,我只能高呼千秋万代一统浆糊、万岁万岁万万岁

不过这等天赋我们是学不来的,只能老老实实写测试

这个帖子里面还有几位一开始都是不写测试的,但后来都开始写了,包括Peter Novig,但他的话很说到点子上去了


引用
Joe Armstrong, on the other hand, says he has moved toward a test-first development style recently:

Seibel: At the point that you start typing code, do you code top-down or bottom-up or middle-out?

Armstrong: Bottom up. I write a little bit and test it, write a little bit and test it. I’ve gone over to this writing test cases first, now. Unit testing. Just write the test cases and then write the code. I feel fairly confident that it works.

The only interviewee who touched directly on TDD versus other approaches was Peter Norvig. He said he does more unit testing than he used to and even said some nice things about TDD but pointed out:

It’s also important to know what you’re doing. When I wrote my Sudoku solver, some bloggers commented on that. They said, “Look at the contrast—here’s Norvig’s Sudoku thing and then there’s this other guy,” whose name I’ve forgotten, one of these test-driven design gurus. He starts off and he says, “Well, I’m going to do Sudoku and I’m going to have this class and first thing I’m going to do is write a bunch of tests.” But then he never got anywhere. He had five different blog posts and in each one he wrote a little bit more and wrote lots of tests but he never got anything working because he didn’t know how to solve the problem.

A bit later Norvig said:

Then bloggers were arguing back and forth about what this means. I don’t think it means much of anything—I think test-driven design is great. I do that a lot more than I used to do. But you can test all you want and if you don’t know how to approach the problem, you’re not going to get a solution.


Ron Jeffries是狂热分子,可以原谅


Knuth嘛自然是人人要拜的,就好比是故老相传百年前少林寺曾有位高僧习全七十二门绝技之类的...

Peter Novig这些人更像是当世的高手,也更加让人觉得亲近些.
0 请登录后投票
   发表时间:2010-02-10   最后修改:2010-02-10
icetortoise 写道
potian 写道
icetortoise 写道
哈哈,Peter Seibel的这篇blog写得...让Ron Jeffries无地自容阿,

Peter Novig不愧是一代宗师阿...偶像偶像

http://www.gigamonkeys.com/blog/2009/10/05/coders-unit-testing.html


这算什么,用纸笔写Tex这种事情还有谁做得出来,我只能高呼千秋万代一统浆糊、万岁万岁万万岁

不过这等天赋我们是学不来的,只能老老实实写测试

这个帖子里面还有几位一开始都是不写测试的,但后来都开始写了,包括Peter Novig,但他的话很说到点子上去了


引用
Joe Armstrong, on the other hand, says he has moved toward a test-first development style recently:

Seibel: At the point that you start typing code, do you code top-down or bottom-up or middle-out?

Armstrong: Bottom up. I write a little bit and test it, write a little bit and test it. I’ve gone over to this writing test cases first, now. Unit testing. Just write the test cases and then write the code. I feel fairly confident that it works.

The only interviewee who touched directly on TDD versus other approaches was Peter Norvig. He said he does more unit testing than he used to and even said some nice things about TDD but pointed out:

It’s also important to know what you’re doing. When I wrote my Sudoku solver, some bloggers commented on that. They said, “Look at the contrast—here’s Norvig’s Sudoku thing and then there’s this other guy,” whose name I’ve forgotten, one of these test-driven design gurus. He starts off and he says, “Well, I’m going to do Sudoku and I’m going to have this class and first thing I’m going to do is write a bunch of tests.” But then he never got anywhere. He had five different blog posts and in each one he wrote a little bit more and wrote lots of tests but he never got anything working because he didn’t know how to solve the problem.

A bit later Norvig said:

Then bloggers were arguing back and forth about what this means. I don’t think it means much of anything—I think test-driven design is great. I do that a lot more than I used to do. But you can test all you want and if you don’t know how to approach the problem, you’re not going to get a solution.


Ron Jeffries是狂热分子,可以原谅


Knuth嘛自然是人人要拜的,就好比是故老相传百年前少林寺曾有位高僧习全七十二门绝技之类的...

Peter Novig这些人更像是当世的高手,也更加让人觉得亲近些.


真正让我佩服的是这些人一辈子在写程序

人到30-40岁以后就知道这个会有多少难了

唯有乐趣才能如此



Peter Novig可是LISP狂人呀


0 请登录后投票
   发表时间:2010-02-10  
兴趣所在呀,我觉得我40以后仍能坚持 装b和吹牛
1 请登录后投票
   发表时间:2010-02-11  
night_stalker 写道
C++ 有些地方会比 C 慢很多呢,方便程度也不如脚本语言。最好的均衡还是 C 和脚本。

http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf


话说你仔细看过这个 PPT 的内容没有?你真的觉得这个 PPT 里的材料能够支持你的论点,也就是能够支持“C++ 有些地方会比 C 慢很多”?

potian 写道
...

有时候俺们人轻言微,大牛的话可以挺腰杆的

PASCAL和C的设计理念不同,一门是学术语言,一门是程序员语言,这种批评我可以理解,虽然这个越界的批评真有点无厘头

不过我看来Ken Thompson的批评绝大多数是切中要害的,不但是他,几乎所有人的批评都在说同一件事情,太复杂,大家都要看着用,拿一块用,看起来大家都在用C++,其实大家都在用自己的C++

核心当然是design by committee ,还有就是C++的核心理念不够清除,另外他的回复勾画出的那么一个人物形象,倒让我有点颇为唏嘘

要谈我对语言的感觉,C、Smalltalk、LISP都堪称精巧细致。C那种掌控一切、人机合一的感觉,Smalltalk那种万物兼对象的感觉,LISP那种和lambda演算丝丝入扣的感觉。PASCAL则是那种一招一式堂堂正正大开大合的感觉。而C++则如汪洋大海,四处暗礁密布,实在令人无所适从呀。


Potian 你也算是五钻会员了,还人微言轻?那我这号一钻的岂不是要直接钻到墙角画圈去了?

要说这个对 C++ 的批评:“太复杂,大家都要看着用,拿一块用,看起来大家都在用C++,其实大家都在用自己的C++”,我觉得不在点子上。C++ 复杂是没错,但后半句说的“大家都在用自己的 C++”这一条,并不是由于 C++ 复杂导致的,更多的是因为 C++ 被应用在许多本质需求大不相同的领域。做 GUI 界面库和 X server 的用 C++,做游戏的用 C++,做高并发访问 web server 的用 C++,做 mapreduce 大规模数据批量处理的也用 C++,这些方向要解决的问题、面对的需求、权衡的侧重,除了“性能要好”这个口号之外,实质内容相当地不一样。与此同时,C++ 的设计理念之一就是减少限制,放权给程序员让他们按照自己希望的样子来用 C++。那么这种情况下,不同的程序员把“C++”这块橡皮泥各自捏成适合自己的样子,实在是很自然的事情 —— 若是换了个设计理念不同的语言,比如主张“做一件事应该有且仅有一种方法”的,那就好比一块出厂就成型的石头,结果某些领域的程序员用得很爽,都不用捏,但另一些程序员就只好彻底放弃了。

当然了,这两种思路哪一种更好还挺难说,就我个人而言,还是相当喜欢捏橡皮泥的。

不过 C++ 确实是完蛋了。这个最大的败笔就是搞成了操蛋的 design by commitee,从此彻底绝了这门语言正常演化的可能性。前些年我还抱有幻想,现在已经彻底抛弃希望了。

Trustno1 写道
0x被废以后,C++这个东西就无甚意义了.
原本我以为Concept好歹把Haskell的Class 系统实用化了.但是0X直接Cancel了.
没有任何卖点,没有任何卖点了亚.


说实在的,Concept 就算出来也没意义了,你看它那个 proposal ,罗嗦得一塌糊涂,就算定义出来了我也敢打包票,会象 export 关键字一样没人实现。

现在是看得越来越清楚,C++ 太早进入了 ISO 这个大泥坑,从此走向了求全妥协的邪路。话说 C++ 若是能在早一些的时候,针对语言演化中出现的新问题以损失一定的向后兼容性为代价对核心语言做一些重构,今天多半就是另一种局面。嗯嗯,现在就只好等下一种真正的系统编程语言了。
0 请登录后投票
论坛首页 海阔天空版

跳转论坛:
Global site tag (gtag.js) - Google Analytics