The Unreasonable Effectiveness of C

c
chebyshev
楼主 (未名空间)

先看个作者说的笑话:
【I've written a byte code VM in C++ that's been deployed on 100 million+
desktops and 100's of thousands of servers. I used C++ inheritance,
templates, exceptions, custom memory allocation and a bunch of other
features I thought were very cool at the time. Now I feel bad for the people who have to maintain it。】
http://damienkatz.net/2013/01/the_unreasonable_effectiveness_of_c.htmlhttp://damienkatz.net/2013/01/follow_up_to_the_unreasonable.html

这个blog很早之前我贴过。不过估计无人注意。
作者有twitter。有兴趣者可以问问题。

讨论各处都有:http://lambda-the-ultimate.org/node/4674https://news.ycombinator.com/item?id=5075370

我个人的看法与作者有不同,也有相同。

不同者为:我认为不应该有一种语言或者coding system来dominate软件产业。
相同者为: C is very very hard to beat。

当然,也会有人同样的说Java/cpp/c sharp/js/python is very very hard to beat...
我个人的理解,这些第一层的coding system都very very hard to beat。

n
netghost

unreasonable其實是因爲很多人看不明白一個事實:

寫代碼比讀代碼簡單。
寫代碼比讀代碼簡單。
寫代碼比讀代碼簡單。

重要的事情說三遍,沒了。

【 在 chebyshev (......) 的大作中提到: 】
: http://damienkatz.net/2013/01/the_unreasonable_effectiveness_of_c.html
: http://damienkatz.net/2013/01/follow_up_to_the_unreasonable.html
: 这个很早的blog之前我贴过。不过估计无人注意。
: 作者有twitter。有兴趣者可以问问题。
: 讨论各处都有:
: http://lambda-the-ultimate.org/node/4674
: https://news.ycombinator.com/item?id=5075370
: 我个人的看法与作者有不同,也有相同。
: 不同者为:我认为不应该有一种语言或者coding system来dominate软件产业。
: 相同者为: C is very very hard to beat.
: ...................

c
chebyshev

作者从维护角度出发,引出问题。也有一定道理。
【I've written a byte code VM in C++ that's been deployed on 100 million+
desktops and 100's of thousands of servers. I used C++ inheritance,
templates, exceptions, custom memory allocation and a bunch of other
features I thought were very cool at the time. Now I feel bad for the peoplewho have to maintain it。】

【 在 netghost (Up to Isomorphism) 的大作中提到: 】
: unreasonable其實是因爲很多人看不明白一個事實:
: 寫代碼比讀代碼簡單。
: 寫代碼比讀代碼簡單。
: 寫代碼比讀代碼簡單。
: 重要的事情說三編,沒了。

n
netghost

對的,這是一個具體例子。

自己寫程序是建一棵樹出來,讀別人的代碼是NP hard problem,難度至少等於sub
cover problem。這事情無解的,不知道這麼簡單一個事實,爲啥很多人不知道。

所以你自己寫得越爽,別人讀起來越難受,尤其是如果寫程序的人越白癡還讓他他寫得越爽的語言,別人讀起來就越難受。

【 在 chebyshev (......) 的大作中提到: 】
: 作者从维护角度出发,引出问题。也有一定道理。
: 【I've written a byte code VM in C++ that's been deployed on 100 million+
: desktops and 100's of thousands of servers. I used C++ inheritance,
: templates, exceptions, custom memory allocation and a bunch of other
: features I thought were very cool at the time. Now I feel bad for the
people
: who have to maintain it。】

c
chebyshev

所谓的代码易读性我觉得其实没大用。
不管怎么设计语言,我觉得都没用。没有什么程序语言是容易读的。

所以两件事不如分开。
易读性不要在语言的特性里去追求。

可以专门写个故事,代码一点点放进去解释。
这个文件还可重用。为其他东西提供资料。

【 在 netghost (Up to Isomorphism) 的大作中提到: 】
: 對的,這是一個具體例子。
: 自己寫程序是建一棵樹出來,讀別人的代碼是NP hard problem,難度至少等於sub
: cover problem。這事情無解的,不知道這麼簡單一個事實,爲啥很多人不知道。
: 所以你自己寫得越爽,別人讀起來越難受,尤其是如果寫程序的人越白癡還讓他他寫得
: 越爽的語言,別人讀起來就越難受。
: people

T
TheMatrix

有道理。读代码的确比写代码难,在已知算法的情况下。

【 在 netghost (Up to Isomorphism) 的大作中提到: 】
: 對的,這是一個具體例子。
: 自己寫程序是建一棵樹出來,讀別人的代碼是NP hard problem,難度至少等於sub
: cover problem。這事情無解的,不知道這麼簡單一個事實,爲啥很多人不知道。
: 所以你自己寫得越爽,別人讀起來越難受,尤其是如果寫程序的人越白癡還讓他他寫得
: 越爽的語言,別人讀起來就越難受。
: people

C
Caravel

牵扯到一个世界的可解释性问题,Wolfram发现元胞自动机rule101的规则极其简单,但是生成的图形极其复杂。所以他认为应该有一种new kind of science,大家都去尝试
小的rule生成器,观察最后形成的结构,会不会有时空,量子力学等等出来。

【 在 TheMatrix (TheMatrix) 的大作中提到: 】
: 有道理。读代码的确比写代码难,在已知算法的情况下。