k*g
2 楼
1 功能
c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
c++完备;
其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
2 软件开发
c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
励”、“帮助”庞大的程序群的“创造”、“管理”;
用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
个人估计需要5年;
3 软件工程
即便不是做软件,而是写个1万行数量级的程序,c++也因为promotes优良的编程习惯而
战胜fortran;
4 super c
如果没有那么多的“object”,不需要++,那么可以不用c++的那些oop东西,把它当作
一个改进的c,有人称之super c,来用;这样,c++和fortran都是command oriented的
结构化语言; 用super c 写的程序,将来能比较迅速地upgrade成软件,if fortran,
得
c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
c++完备;
其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
2 软件开发
c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
励”、“帮助”庞大的程序群的“创造”、“管理”;
用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
个人估计需要5年;
3 软件工程
即便不是做软件,而是写个1万行数量级的程序,c++也因为promotes优良的编程习惯而
战胜fortran;
4 super c
如果没有那么多的“object”,不需要++,那么可以不用c++的那些oop东西,把它当作
一个改进的c,有人称之super c,来用;这样,c++和fortran都是command oriented的
结构化语言; 用super c 写的程序,将来能比较迅速地upgrade成软件,if fortran,
得
k*g
4 楼
Oh, sh*t, 藕的程序copy到这儿成这个样子了
z*h
5 楼
你这样。。。。
不暴露 姓名。。。。 告诉八字 ,自然有人会算。。
不暴露 姓名。。。。 告诉八字 ,自然有人会算。。
k*g
6 楼
Oh, sh*t, 藕的程序copy到这儿成这个样子了
本来相给大家做个示范动作,show一下how beautiful c++ is;
结果,藕从鞍马上一个跟斗摔了下来、、、
本来相给大家做个示范动作,show一下how beautiful c++ is;
结果,藕从鞍马上一个跟斗摔了下来、、、
k*g
7 楼
Oh, sh*t, 藕的程序copy到这儿成这个样子了
本来想给大家做个示范动作,show一下how beautiful c++ is;
结果,藕从鞍马上一个跟斗摔了下来、、、
不过,可别小看以上这段程序:
在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
+,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
+程序,受到启发,才悟出应该如何写;
本来想给大家做个示范动作,show一下how beautiful c++ is;
结果,藕从鞍马上一个跟斗摔了下来、、、
不过,可别小看以上这段程序:
在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
+,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
+程序,受到启发,才悟出应该如何写;
j*u
8 楼
藕的博士论文程序只用了4个左右的很简短的subroutine,就完成了“并行计算”,效
果是:8个processors,速度是8倍;
这个是你写的还是转贴的?很有意思.开始我还以为你自己开发了并行计算的东西,结果
还是用的mpi。其实那些程序用fortran一样很容易实现,不知道贴这个对你想说明的观
点有什么作用?另外你的speedup最高,是因为processor之间的commonication很少,这
个和语言没有任何关系,是和你的问题直接相关的。
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
果是:8个processors,速度是8倍;
这个是你写的还是转贴的?很有意思.开始我还以为你自己开发了并行计算的东西,结果
还是用的mpi。其实那些程序用fortran一样很容易实现,不知道贴这个对你想说明的观
点有什么作用?另外你的speedup最高,是因为processor之间的commonication很少,这
个和语言没有任何关系,是和你的问题直接相关的。
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
l*i
9 楼
这个"藕"让我想起了名噪一时的网络名人XX姐姐
【在 k*********g 的大作中提到】
: Oh, sh*t, 藕的程序copy到这儿成这个样子了
: 本来想给大家做个示范动作,show一下how beautiful c++ is;
: 结果,藕从鞍马上一个跟斗摔了下来、、、
: 不过,可别小看以上这段程序:
: 在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
: +,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
: 很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
: +程序,受到启发,才悟出应该如何写;
【在 k*********g 的大作中提到】
: Oh, sh*t, 藕的程序copy到这儿成这个样子了
: 本来想给大家做个示范动作,show一下how beautiful c++ is;
: 结果,藕从鞍马上一个跟斗摔了下来、、、
: 不过,可别小看以上这段程序:
: 在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
: +,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
: 很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
: +程序,受到启发,才悟出应该如何写;
i*g
10 楼
c++比fortran才慢10%左右的详细对比情况?出处?
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
e*l
13 楼
fortran本来就是专门搞数值计算,用它做非数值的东西不是瞎搞么?
C++并不是什么都能做,底层的硬件操控还得靠汇编。
f77就是垃圾,f90标准出来得太晚,而且太保守,但是比f77好的多。
面向对象的语言多了去了,把C++说成是最好语言就是扯淡!
C++语法复杂,编程中需要关注的细节很多,编程效率并不高,相比Fortran隐藏
了很多细节,要简单得多,你的10人年的例子就是胡扯!
C++促进优良的编程习惯?地球人都笑了!难道用fortran就没有良好的编程习惯
了?
第5点是你自己凭空造的吧,你学过计算机操作系统没有?
速度的提法也是扯淡,C++编写代码以及调试比fortran要复杂得多。
你贴的博士论文上的代码有点糟糕,你只是把C++当成C在用而已,同样的东西用
frotran也可以做得更漂亮.
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
C++并不是什么都能做,底层的硬件操控还得靠汇编。
f77就是垃圾,f90标准出来得太晚,而且太保守,但是比f77好的多。
面向对象的语言多了去了,把C++说成是最好语言就是扯淡!
C++语法复杂,编程中需要关注的细节很多,编程效率并不高,相比Fortran隐藏
了很多细节,要简单得多,你的10人年的例子就是胡扯!
C++促进优良的编程习惯?地球人都笑了!难道用fortran就没有良好的编程习惯
了?
第5点是你自己凭空造的吧,你学过计算机操作系统没有?
速度的提法也是扯淡,C++编写代码以及调试比fortran要复杂得多。
你贴的博士论文上的代码有点糟糕,你只是把C++当成C在用而已,同样的东西用
frotran也可以做得更漂亮.
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
e*l
14 楼
你不要侮辱了C++
孤陋寡闻,进程间通讯本来就可以同步或者异步,这是基本常识
【在 k*********g 的大作中提到】
: Oh, sh*t, 藕的程序copy到这儿成这个样子了
: 本来想给大家做个示范动作,show一下how beautiful c++ is;
: 结果,藕从鞍马上一个跟斗摔了下来、、、
: 不过,可别小看以上这段程序:
: 在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
: +,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
: 很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
: +程序,受到启发,才悟出应该如何写;
孤陋寡闻,进程间通讯本来就可以同步或者异步,这是基本常识
【在 k*********g 的大作中提到】
: Oh, sh*t, 藕的程序copy到这儿成这个样子了
: 本来想给大家做个示范动作,show一下how beautiful c++ is;
: 结果,藕从鞍马上一个跟斗摔了下来、、、
: 不过,可别小看以上这段程序:
: 在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
: +,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
: 很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
: +程序,受到启发,才悟出应该如何写;
m*7
15 楼
楼主真的对fortran了解到和c一样的程度了吗?还是只实在微机层面上的了解?
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
b*z
16 楼
刀和剑哪个好?
梅需逊雪三分白,雪却输梅一段香。
单纯这样比较没有意义。
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
梅需逊雪三分白,雪却输梅一段香。
单纯这样比较没有意义。
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
l*G
17 楼
Look at what Linus says:
"C++ is a horrible language. It's made more horrible by the fact that a
lot of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if the
choice of C were to do nothing but keep the C++ programmers out, that in
itself would be a huge reason to use C."
http://twlevo.blogspot.com/2010/06/linus-on-c-usage-is-bad-thing-todo.html
"C++ is a horrible language. It's made more horrible by the fact that a
lot of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if the
choice of C were to do nothing but keep the C++ programmers out, that in
itself would be a huge reason to use C."
http://twlevo.blogspot.com/2010/06/linus-on-c-usage-is-bad-thing-todo.html
j*f
18 楼
这个专题挺好的。看上面几个讨论,学到好些东西 。:)
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
k*g
19 楼
c++ horrible?
由此来说明你们很潮流?
来来来,
报一个什么都能干的语言出来;
来来来,
说说windows上的applications都用什么写的?
由此来说明你们很潮流?
来来来,
报一个什么都能干的语言出来;
来来来,
说说windows上的applications都用什么写的?
k*g
20 楼
快10%有个屁用?
容易编写、修改、维护、通用的语言, 省10000%的时间;
容易编写、修改、维护、通用的语言, 省10000%的时间;
t*z
21 楼
现在有人单纯用fortran的吗?
一般都是C+fortran + C++混合编程
一般都是C+fortran + C++混合编程
j*x
22 楼
Many legacy codes still exist and work well.
w*1
25 楼
看到c++就开始头晕~~~飘过
m*h
26 楼
感觉是扯淡,编程语言就象说话用的语言一样,用的好与不好完全在于个人的水平和功
力,用c++和fortran一样多能写出优良的好的程序,这样的例子数不胜数,楼主的帖子
只能说明你用c++比用fortran好,无他!!!!
力,用c++和fortran一样多能写出优良的好的程序,这样的例子数不胜数,楼主的帖子
只能说明你用c++比用fortran好,无他!!!!
k*5
29 楼
这儿是科学计算版,不是cs版。
t*z
30 楼
c++的人告诉我传递多维数组的时候是fortran方便还是c++方便
x*u
31 楼
http://thread.gmane.org/gmane.comp.version-control.git/57643/fo
From: Linus Torvalds linux-foundation.org>
Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String
Library.
Newsgroups: gmane.comp.version-control.git
Date: 2007-09-06 17:50:28 GMT (3 years, 38 weeks, 3 hours and 54 minutes ago)
On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
>
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about
portability,
> it's BS.
*YOU* are full of bullshit.
C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.
In other words: the choice of C is the only sane choice. I know Miles
Bader jokingly said "to piss you off", but it's actually true. I've come
to the conclusion that any programmer that would prefer the project to be
in C++ over C is likely a programmer that I really *would* prefer to piss
off, so that he doesn't come and screw up any project I'm involved with.
C++ leads to really really bad design choices. You invariably start using
the "nice" library features of the language like STL and Boost and other
total and utter crap, that may "help" you program, but causes:
- infinite amounts of pain when they don't work (and anybody who tells me
that STL and especially Boost are stable and portable is just so full
of BS that it's not even funny)
- inefficient abstracted programming models where two years down the road
you notice that some abstraction wasn't very efficient, but now all
your code depends on all the nice object models around it, and you
cannot fix it without rewriting your app.
In other words, the only way to do good, efficient, and system-level and
portable C++ ends up to limit yourself to all the things that are
basically available in C. And limiting your project to C means that people
don't screw that up, and also means that you get a lot of programmers that
do actually understand low-level issues and don't screw things up with any
idiotic "object model" crap.
So I'm sorry, but for something like git, where efficiency was a primary
objective, the "advantages" of C++ is just a huge mistake. The fact that
we also piss off people who cannot see that is just a big additional
advantage.
If you want a VCS that is written in C++, go play with Monotone. Really.
They use a "real database". They use "nice object-oriented libraries".
They use "nice C++ abstractions". And quite frankly, as a result of all
these design decisions that sound so appealing to some CS people, the end
result is a horrible and unmaintainable mess.
But I'm sure you'd like it more than git.
Linus
a
the
【在 l*******G 的大作中提到】
: Look at what Linus says:
: "C++ is a horrible language. It's made more horrible by the fact that a
: lot of substandard programmers use it, to the point where it's much much
: easier to generate total and utter crap with it. Quite frankly, even if the
: choice of C were to do nothing but keep the C++ programmers out, that in
: itself would be a huge reason to use C."
: http://twlevo.blogspot.com/2010/06/linus-on-c-usage-is-bad-thing-todo.html
From: Linus Torvalds
Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String
Library.
Newsgroups: gmane.comp.version-control.git
Date: 2007-09-06 17:50:28 GMT (3 years, 38 weeks, 3 hours and 54 minutes ago)
On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
>
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about
portability,
> it's BS.
*YOU* are full of bullshit.
C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.
In other words: the choice of C is the only sane choice. I know Miles
Bader jokingly said "to piss you off", but it's actually true. I've come
to the conclusion that any programmer that would prefer the project to be
in C++ over C is likely a programmer that I really *would* prefer to piss
off, so that he doesn't come and screw up any project I'm involved with.
C++ leads to really really bad design choices. You invariably start using
the "nice" library features of the language like STL and Boost and other
total and utter crap, that may "help" you program, but causes:
- infinite amounts of pain when they don't work (and anybody who tells me
that STL and especially Boost are stable and portable is just so full
of BS that it's not even funny)
- inefficient abstracted programming models where two years down the road
you notice that some abstraction wasn't very efficient, but now all
your code depends on all the nice object models around it, and you
cannot fix it without rewriting your app.
In other words, the only way to do good, efficient, and system-level and
portable C++ ends up to limit yourself to all the things that are
basically available in C. And limiting your project to C means that people
don't screw that up, and also means that you get a lot of programmers that
do actually understand low-level issues and don't screw things up with any
idiotic "object model" crap.
So I'm sorry, but for something like git, where efficiency was a primary
objective, the "advantages" of C++ is just a huge mistake. The fact that
we also piss off people who cannot see that is just a big additional
advantage.
If you want a VCS that is written in C++, go play with Monotone. Really.
They use a "real database". They use "nice object-oriented libraries".
They use "nice C++ abstractions". And quite frankly, as a result of all
these design decisions that sound so appealing to some CS people, the end
result is a horrible and unmaintainable mess.
But I'm sure you'd like it more than git.
Linus
a
the
【在 l*******G 的大作中提到】
: Look at what Linus says:
: "C++ is a horrible language. It's made more horrible by the fact that a
: lot of substandard programmers use it, to the point where it's much much
: easier to generate total and utter crap with it. Quite frankly, even if the
: choice of C were to do nothing but keep the C++ programmers out, that in
: itself would be a huge reason to use C."
: http://twlevo.blogspot.com/2010/06/linus-on-c-usage-is-bad-thing-todo.html
k*g
32 楼
to xiaozhu,
smart people use the good part of c++,
silly people use the bad part of c++.
for example, silly programmers use some very special little things or tricks
. that's really silly. that not only introduces bugs also raise maintenance
fees.
by the way, the thred is the pk between fortran and c++
not the pk between c and c++.
even comparing the common part, the structural programming part of c++ is
much better than c.
when i develop software, only really standard oop stuff will be used. other
oop stuff, if developed by general practioners and if can be anyway kind of
replaced by structral action oriented programming, then will not be adopted.
smart people use the good part of c++,
silly people use the bad part of c++.
for example, silly programmers use some very special little things or tricks
. that's really silly. that not only introduces bugs also raise maintenance
fees.
by the way, the thred is the pk between fortran and c++
not the pk between c and c++.
even comparing the common part, the structural programming part of c++ is
much better than c.
when i develop software, only really standard oop stuff will be used. other
oop stuff, if developed by general practioners and if can be anyway kind of
replaced by structral action oriented programming, then will not be adopted.
k*g
33 楼
1 功能
c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
c++完备;
其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
2 软件开发
c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
励”、“帮助”庞大的程序群的“创造”、“管理”;
用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
个人估计需要5年;
3 软件工程
即便不是做软件,而是写个1万行数量级的程序,c++也因为promotes优良的编程习惯而
战胜fortran;
4 super c
如果没有那么多的“object”,不需要++,那么可以不用c++的那些oop东西,把它当作
一个改进的c,有人称之super c,来用;这样,c++和fortran都是command oriented的
结构化语言; 用super c 写的程序,将来能比较迅速地upgrade成软件,if fortran,
得重写;
5 交流
目前,计算机99%以上是用来“数据搬运”的,主要分“通信”、“数据处理”2大块
;比如,操作系统,就是一个数据搬运问题;
计算机1%不到是用来“数据产生”的,既科学计算;搬运工们基本不用real number;
科学计算的,基本用real number;
那些数据搬运工,即computer science人士,基本不懂fortran;
所以,做科学计算的,if用fortran,数据搬运工们的成果就不能及时拿来主义了;
6 关于“速度”的思辨
c++比fortran才慢10%左右;不用++的c++,比fortran慢得更少;
思辨一下:is 10% speed reduction A big deal?
a 你的程序快10%左右,这样本来需要24小时算完的东西,你的fortran程序22小时就
能算完;这很牛吗?
b 当计算机在计算的时候,你不可以去干别的事吗?慢10%妨碍你啦?
c 为了让计算机省2个小时,你愿意自己多花几百小时、甚至几千小时(this is the
case if 做软件)写程序、改程序、调试程序、维护程序,这样做,是不是太傻B了?
抑或傻A?
藕的博士论文程序只用了4个左右的很简短的subroutine,就完成了“并行计算”,效
果是:8个processors,速度是8倍;
以下是其中一个subroutine:
// filtered gathering of condensed local vector, make sure incoming data not
modified
#include "globalDefined.h"
#include
#include
using namespace std;
#if parallel
#include "mpi.h"
#endif
extern int MPI_Rank, MPI_Size;
extern int MPI_SendList[MPI_MAXSIZE], MPI_ReceiveList[MPI_MAXSIZE];
extern int MPI_Inf[2], MPI_Inf_Buffer[2];
extern double MPI_Vector[MPI_MAXNUMROW], MPI_Vector_Buffer[MPI_MAXNUMROW];
void MPI_superpositionFiltered (
int localContribution, // 0 or 1: local contribution
included or not
int rowCounter, int rowToNode[], int nodeToRow[], double
vector_local[],
int counterFilteredList[],
int rowToNodeFilteredList[][MPI_MAXSIZE], // indexed by
outcoming data
double vector[]
)
{
#if parallel
MPI::COMM_WORLD.Barrier();
#endif
int i;
#if parallel
int j;
int tag = 0;
MPI::Status status;
MPI::Request requestIsend, requestIrecv;
#endif
// initialization
for ( i = 0; i < rowCounter; i++ ) {
vector[i] = 0.0;
}
// possible local contribution
if ( localContribution == 1 ) {
for ( i = 0; i < rowCounter; i++ ) {
vector[i] += vector_local[i];
}
}
#if parallel
MPI::COMM_WORLD.Barrier();
#endif
// broadcast filtered values and positions by all processors
#if parallel
for ( i = 0; i < MPI_Size-1; i++ ) {
for ( j = 0; j < counterFilteredList[MPI_SendList[i]]; j++ ) {
MPI_Vector[j] = vector_local[ nodeToRow[rowToNodeFilteredList[j]
[MPI_SendList[i]]] ];
}
if ( counterFilteredList[MPI_SendList[i]] != 0 ) {
requestIsend = MPI::COMM_WORLD.Isend ( &MPI_Vector,
counterFilteredList[MPI_SendList[i]],
MPI::DOUBLE, MPI_SendList[i], tag );
requestIsend.Wait ( status );
}
if ( counterFilteredList[MPI_ReceiveList[i]] != 0 ) {
requestIrecv = MPI::COMM_WORLD.Irecv ( &MPI_Vector_Buffer,
counterFilteredList[MPI_ReceiveList[i]],
MPI::DOUBLE, MPI_ReceiveList[i], tag );
requestIrecv.Wait ( status );
for ( j = 0; j < counterFilteredList[MPI_ReceiveList[i]]; j++ ) {
vector[ nodeToRow[rowToNodeFilteredList[j][MPI_ReceiveList[i
]]] ] += MPI_Vector_Buffer[j];
}
}
}
#endif
#if parallel
MPI::COMM_WORLD.Barrier();
#endif
}
c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
c++完备;
其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
2 软件开发
c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
励”、“帮助”庞大的程序群的“创造”、“管理”;
用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
个人估计需要5年;
3 软件工程
即便不是做软件,而是写个1万行数量级的程序,c++也因为promotes优良的编程习惯而
战胜fortran;
4 super c
如果没有那么多的“object”,不需要++,那么可以不用c++的那些oop东西,把它当作
一个改进的c,有人称之super c,来用;这样,c++和fortran都是command oriented的
结构化语言; 用super c 写的程序,将来能比较迅速地upgrade成软件,if fortran,
得重写;
5 交流
目前,计算机99%以上是用来“数据搬运”的,主要分“通信”、“数据处理”2大块
;比如,操作系统,就是一个数据搬运问题;
计算机1%不到是用来“数据产生”的,既科学计算;搬运工们基本不用real number;
科学计算的,基本用real number;
那些数据搬运工,即computer science人士,基本不懂fortran;
所以,做科学计算的,if用fortran,数据搬运工们的成果就不能及时拿来主义了;
6 关于“速度”的思辨
c++比fortran才慢10%左右;不用++的c++,比fortran慢得更少;
思辨一下:is 10% speed reduction A big deal?
a 你的程序快10%左右,这样本来需要24小时算完的东西,你的fortran程序22小时就
能算完;这很牛吗?
b 当计算机在计算的时候,你不可以去干别的事吗?慢10%妨碍你啦?
c 为了让计算机省2个小时,你愿意自己多花几百小时、甚至几千小时(this is the
case if 做软件)写程序、改程序、调试程序、维护程序,这样做,是不是太傻B了?
抑或傻A?
藕的博士论文程序只用了4个左右的很简短的subroutine,就完成了“并行计算”,效
果是:8个processors,速度是8倍;
以下是其中一个subroutine:
// filtered gathering of condensed local vector, make sure incoming data not
modified
#include "globalDefined.h"
#include
#include
using namespace std;
#if parallel
#include "mpi.h"
#endif
extern int MPI_Rank, MPI_Size;
extern int MPI_SendList[MPI_MAXSIZE], MPI_ReceiveList[MPI_MAXSIZE];
extern int MPI_Inf[2], MPI_Inf_Buffer[2];
extern double MPI_Vector[MPI_MAXNUMROW], MPI_Vector_Buffer[MPI_MAXNUMROW];
void MPI_superpositionFiltered (
int localContribution, // 0 or 1: local contribution
included or not
int rowCounter, int rowToNode[], int nodeToRow[], double
vector_local[],
int counterFilteredList[],
int rowToNodeFilteredList[][MPI_MAXSIZE], // indexed by
outcoming data
double vector[]
)
{
#if parallel
MPI::COMM_WORLD.Barrier();
#endif
int i;
#if parallel
int j;
int tag = 0;
MPI::Status status;
MPI::Request requestIsend, requestIrecv;
#endif
// initialization
for ( i = 0; i < rowCounter; i++ ) {
vector[i] = 0.0;
}
// possible local contribution
if ( localContribution == 1 ) {
for ( i = 0; i < rowCounter; i++ ) {
vector[i] += vector_local[i];
}
}
#if parallel
MPI::COMM_WORLD.Barrier();
#endif
// broadcast filtered values and positions by all processors
#if parallel
for ( i = 0; i < MPI_Size-1; i++ ) {
for ( j = 0; j < counterFilteredList[MPI_SendList[i]]; j++ ) {
MPI_Vector[j] = vector_local[ nodeToRow[rowToNodeFilteredList[j]
[MPI_SendList[i]]] ];
}
if ( counterFilteredList[MPI_SendList[i]] != 0 ) {
requestIsend = MPI::COMM_WORLD.Isend ( &MPI_Vector,
counterFilteredList[MPI_SendList[i]],
MPI::DOUBLE, MPI_SendList[i], tag );
requestIsend.Wait ( status );
}
if ( counterFilteredList[MPI_ReceiveList[i]] != 0 ) {
requestIrecv = MPI::COMM_WORLD.Irecv ( &MPI_Vector_Buffer,
counterFilteredList[MPI_ReceiveList[i]],
MPI::DOUBLE, MPI_ReceiveList[i], tag );
requestIrecv.Wait ( status );
for ( j = 0; j < counterFilteredList[MPI_ReceiveList[i]]; j++ ) {
vector[ nodeToRow[rowToNodeFilteredList[j][MPI_ReceiveList[i
]]] ] += MPI_Vector_Buffer[j];
}
}
}
#endif
#if parallel
MPI::COMM_WORLD.Barrier();
#endif
}
k*g
34 楼
Oh, sh*t, 藕的程序copy到这儿成这个样子了
k*g
35 楼
Oh, sh*t, 藕的程序copy到这儿成这个样子了
本来相给大家做个示范动作,show一下how beautiful c++ is;
结果,藕从鞍马上一个跟斗摔了下来、、、
本来相给大家做个示范动作,show一下how beautiful c++ is;
结果,藕从鞍马上一个跟斗摔了下来、、、
k*g
36 楼
Oh, sh*t, 藕的程序copy到这儿成这个样子了
本来想给大家做个示范动作,show一下how beautiful c++ is;
结果,藕从鞍马上一个跟斗摔了下来、、、
不过,可别小看以上这段程序:
在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
+,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
+程序,受到启发,才悟出应该如何写;
本来想给大家做个示范动作,show一下how beautiful c++ is;
结果,藕从鞍马上一个跟斗摔了下来、、、
不过,可别小看以上这段程序:
在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
+,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
+程序,受到启发,才悟出应该如何写;
j*u
37 楼
藕的博士论文程序只用了4个左右的很简短的subroutine,就完成了“并行计算”,效
果是:8个processors,速度是8倍;
这个是你写的还是转贴的?很有意思.开始我还以为你自己开发了并行计算的东西,结果
还是用的mpi。其实那些程序用fortran一样很容易实现,不知道贴这个对你想说明的观
点有什么作用?另外你的speedup最高,是因为processor之间的commonication很少,这
个和语言没有任何关系,是和你的问题直接相关的。
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
果是:8个processors,速度是8倍;
这个是你写的还是转贴的?很有意思.开始我还以为你自己开发了并行计算的东西,结果
还是用的mpi。其实那些程序用fortran一样很容易实现,不知道贴这个对你想说明的观
点有什么作用?另外你的speedup最高,是因为processor之间的commonication很少,这
个和语言没有任何关系,是和你的问题直接相关的。
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
l*i
38 楼
这个"藕"让我想起了名噪一时的网络名人XX姐姐
【在 k*********g 的大作中提到】
: Oh, sh*t, 藕的程序copy到这儿成这个样子了
: 本来想给大家做个示范动作,show一下how beautiful c++ is;
: 结果,藕从鞍马上一个跟斗摔了下来、、、
: 不过,可别小看以上这段程序:
: 在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
: +,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
: 很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
: +程序,受到启发,才悟出应该如何写;
【在 k*********g 的大作中提到】
: Oh, sh*t, 藕的程序copy到这儿成这个样子了
: 本来想给大家做个示范动作,show一下how beautiful c++ is;
: 结果,藕从鞍马上一个跟斗摔了下来、、、
: 不过,可别小看以上这段程序:
: 在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
: +,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
: 很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
: +程序,受到启发,才悟出应该如何写;
i*g
39 楼
c++比fortran才慢10%左右的详细对比情况?出处?
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
e*l
42 楼
fortran本来就是专门搞数值计算,用它做非数值的东西不是瞎搞么?
C++并不是什么都能做,底层的硬件操控还得靠汇编。
f77就是垃圾,f90标准出来得太晚,而且太保守,但是比f77好的多。
面向对象的语言多了去了,把C++说成是最好语言就是扯淡!
C++语法复杂,编程中需要关注的细节很多,编程效率并不高,相比Fortran隐藏
了很多细节,要简单得多,你的10人年的例子就是胡扯!
C++促进优良的编程习惯?地球人都笑了!难道用fortran就没有良好的编程习惯
了?
第5点是你自己凭空造的吧,你学过计算机操作系统没有?
速度的提法也是扯淡,C++编写代码以及调试比fortran要复杂得多。
你贴的博士论文上的代码有点糟糕,你只是把C++当成C在用而已,同样的东西用
frotran也可以做得更漂亮.
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
C++并不是什么都能做,底层的硬件操控还得靠汇编。
f77就是垃圾,f90标准出来得太晚,而且太保守,但是比f77好的多。
面向对象的语言多了去了,把C++说成是最好语言就是扯淡!
C++语法复杂,编程中需要关注的细节很多,编程效率并不高,相比Fortran隐藏
了很多细节,要简单得多,你的10人年的例子就是胡扯!
C++促进优良的编程习惯?地球人都笑了!难道用fortran就没有良好的编程习惯
了?
第5点是你自己凭空造的吧,你学过计算机操作系统没有?
速度的提法也是扯淡,C++编写代码以及调试比fortran要复杂得多。
你贴的博士论文上的代码有点糟糕,你只是把C++当成C在用而已,同样的东西用
frotran也可以做得更漂亮.
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
e*l
43 楼
你不要侮辱了C++
孤陋寡闻,进程间通讯本来就可以同步或者异步,这是基本常识
【在 k*********g 的大作中提到】
: Oh, sh*t, 藕的程序copy到这儿成这个样子了
: 本来想给大家做个示范动作,show一下how beautiful c++ is;
: 结果,藕从鞍马上一个跟斗摔了下来、、、
: 不过,可别小看以上这段程序:
: 在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
: +,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
: 很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
: +程序,受到启发,才悟出应该如何写;
孤陋寡闻,进程间通讯本来就可以同步或者异步,这是基本常识
【在 k*********g 的大作中提到】
: Oh, sh*t, 藕的程序copy到这儿成这个样子了
: 本来想给大家做个示范动作,show一下how beautiful c++ is;
: 结果,藕从鞍马上一个跟斗摔了下来、、、
: 不过,可别小看以上这段程序:
: 在2007年春天写这段并行程序的时候,which用nonblocking communications with C+
: +,可能是世界首次;当时藕花了很长时间琢磨、网上搜索,因为藕的C++水平其实
: 很烂;几天后,看到芝加哥大学的一个教授的一段blocking communications with c+
: +程序,受到启发,才悟出应该如何写;
m*7
44 楼
楼主真的对fortran了解到和c一样的程度了吗?还是只实在微机层面上的了解?
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
b*z
45 楼
刀和剑哪个好?
梅需逊雪三分白,雪却输梅一段香。
单纯这样比较没有意义。
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
梅需逊雪三分白,雪却输梅一段香。
单纯这样比较没有意义。
10
【在 k*********g 的大作中提到】
: 1 功能
: c++什么都能做,早期fortran只能做数值计算,现在能做非数值的东西,但还是远没有
: c++完备;
: 其实,fortran77是个好东西:专项、简单;从fortran90开始,哲学出了问题;
: 2 软件开发
: c++是开发软件的最好语言,很大程度是因为它的“面向对象”的特点,其实就是“鼓
: 励”、“帮助”庞大的程序群的“创造”、“管理”;
: 用fortran写软件,不仅仅有些功能(如,对计算机软硬件的操作)没法办,而且整个
: 软件会被管理得一塌糊涂;用c++,10个人1年就能搞定的东西,if用frotran,同样10
: 个人估计需要5年;
t*z
46 楼
I have to change my mind recently. C++ is the trend in the future. Fortran
is dying even in the numerical computational field.
is dying even in the numerical computational field.
t*n
47 楼
准备写书了。那位参与?
Programing in Engineering by C++
Programing in Engineering by C++
x*u
49 楼
Is there a good book on oop? Thanks!
tricks
maintenance
【在 k*********g 的大作中提到】
: to xiaozhu,
: smart people use the good part of c++,
: silly people use the bad part of c++.
: for example, silly programmers use some very special little things or tricks
: . that's really silly. that not only introduces bugs also raise maintenance
: fees.
: by the way, the thred is the pk between fortran and c++
: not the pk between c and c++.
: even comparing the common part, the structural programming part of c++ is
: much better than c.
tricks
maintenance
【在 k*********g 的大作中提到】
: to xiaozhu,
: smart people use the good part of c++,
: silly people use the bad part of c++.
: for example, silly programmers use some very special little things or tricks
: . that's really silly. that not only introduces bugs also raise maintenance
: fees.
: by the way, the thred is the pk between fortran and c++
: not the pk between c and c++.
: even comparing the common part, the structural programming part of c++ is
: much better than c.
l*G
51 楼
Look at what Linus says:
"C++ is a horrible language. It's made more horrible by the fact that a
lot of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if the
choice of C were to do nothing but keep the C++ programmers out, that in
itself would be a huge reason to use C."
http://twlevo.blogspot.com/2010/06/linus-on-c-usage-is-bad-thin
"C++ is a horrible language. It's made more horrible by the fact that a
lot of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if the
choice of C were to do nothing but keep the C++ programmers out, that in
itself would be a huge reason to use C."
http://twlevo.blogspot.com/2010/06/linus-on-c-usage-is-bad-thin
k*g
52 楼
c++ horrible?
由此来说明你们很潮流?
来来来,
报一个什么都能干的语言出来;
来来来,
说说windows上的applications都用什么写的?
由此来说明你们很潮流?
来来来,
报一个什么都能干的语言出来;
来来来,
说说windows上的applications都用什么写的?
k*g
53 楼
快10%有个屁用?
容易编写、修改、维护、通用的语言, 省10000%的时间;
容易编写、修改、维护、通用的语言, 省10000%的时间;
t*z
54 楼
现在有人单纯用fortran的吗?
一般都是C+fortran + C++混合编程
一般都是C+fortran + C++混合编程
j*x
55 楼
Many legacy codes still exist and work well.
w*1
58 楼
看到c++就开始头晕~~~飘过
m*h
59 楼
感觉是扯淡,编程语言就象说话用的语言一样,用的好与不好完全在于个人的水平和功
力,用c++和fortran一样多能写出优良的好的程序,这样的例子数不胜数,楼主的帖子
只能说明你用c++比用fortran好,无他!!!!
力,用c++和fortran一样多能写出优良的好的程序,这样的例子数不胜数,楼主的帖子
只能说明你用c++比用fortran好,无他!!!!
k*5
62 楼
这儿是科学计算版,不是cs版。
t*z
63 楼
c++的人告诉我传递多维数组的时候是fortran方便还是c++方便
x*u
64 楼
http://thread.gmane.org/gmane.comp.version-control.git/57643/fo
From: Linus Torvalds linux-foundation.org>
Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String
Library.
Newsgroups: gmane.comp.version-control.git
Date: 2007-09-06 17:50:28 GMT (3 years, 38 weeks, 3 hours and 54 minutes ago)
On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
>
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about
portability,
> it's BS.
*YOU* are full of bullshit.
C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.
In other words: the choice of C is the only sane choice. I know Miles
Bader jokingly said "to piss you off", but it's actually true. I've come
to the conclusion that any programmer that would prefer the project to be
in C++ over C is likely a programmer that I really *would* prefer to piss
off, so that he doesn't come and screw up any project I'm involved with.
C++ leads to really really bad design choices. You invariably start using
the "nice" library features of the language like STL and Boost and other
total and utter crap, that may "help" you program, but causes:
- infinite amounts of pain when they don't work (and anybody who tells me
that STL and especially Boost are stable and portable is just so full
of BS that it's not even funny)
- inefficient abstracted programming models where two years down the road
you notice that some abstraction wasn't very efficient, but now all
your code depends on all the nice object models around it, and you
cannot fix it without rewriting your app.
In other words, the only way to do good, efficient, and system-level and
portable C++ ends up to limit yourself to all the things that are
basically available in C. And limiting your project to C means that people
don't screw that up, and also means that you get a lot of programmers that
do actually understand low-level issues and don't screw things up with any
idiotic "object model" crap.
So I'm sorry, but for something like git, where efficiency was a primary
objective, the "advantages" of C++ is just a huge mistake. The fact that
we also piss off people who cannot see that is just a big additional
advantage.
If you want a VCS that is written in C++, go play with Monotone. Really.
They use a "real database". They use "nice object-oriented libraries".
They use "nice C++ abstractions". And quite frankly, as a result of all
these design decisions that sound so appealing to some CS people, the end
result is a horrible and unmaintainable mess.
But I'm sure you'd like it more than git.
Linus
a
the
【在 l*******G 的大作中提到】
: Look at what Linus says:
: "C++ is a horrible language. It's made more horrible by the fact that a
: lot of substandard programmers use it, to the point where it's much much
: easier to generate total and utter crap with it. Quite frankly, even if the
: choice of C were to do nothing but keep the C++ programmers out, that in
: itself would be a huge reason to use C."
: http://twlevo.blogspot.com/2010/06/linus-on-c-usage-is-bad-thin
From: Linus Torvalds
Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String
Library.
Newsgroups: gmane.comp.version-control.git
Date: 2007-09-06 17:50:28 GMT (3 years, 38 weeks, 3 hours and 54 minutes ago)
On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
>
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about
portability,
> it's BS.
*YOU* are full of bullshit.
C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.
In other words: the choice of C is the only sane choice. I know Miles
Bader jokingly said "to piss you off", but it's actually true. I've come
to the conclusion that any programmer that would prefer the project to be
in C++ over C is likely a programmer that I really *would* prefer to piss
off, so that he doesn't come and screw up any project I'm involved with.
C++ leads to really really bad design choices. You invariably start using
the "nice" library features of the language like STL and Boost and other
total and utter crap, that may "help" you program, but causes:
- infinite amounts of pain when they don't work (and anybody who tells me
that STL and especially Boost are stable and portable is just so full
of BS that it's not even funny)
- inefficient abstracted programming models where two years down the road
you notice that some abstraction wasn't very efficient, but now all
your code depends on all the nice object models around it, and you
cannot fix it without rewriting your app.
In other words, the only way to do good, efficient, and system-level and
portable C++ ends up to limit yourself to all the things that are
basically available in C. And limiting your project to C means that people
don't screw that up, and also means that you get a lot of programmers that
do actually understand low-level issues and don't screw things up with any
idiotic "object model" crap.
So I'm sorry, but for something like git, where efficiency was a primary
objective, the "advantages" of C++ is just a huge mistake. The fact that
we also piss off people who cannot see that is just a big additional
advantage.
If you want a VCS that is written in C++, go play with Monotone. Really.
They use a "real database". They use "nice object-oriented libraries".
They use "nice C++ abstractions". And quite frankly, as a result of all
these design decisions that sound so appealing to some CS people, the end
result is a horrible and unmaintainable mess.
But I'm sure you'd like it more than git.
Linus
a
the
【在 l*******G 的大作中提到】
: Look at what Linus says:
: "C++ is a horrible language. It's made more horrible by the fact that a
: lot of substandard programmers use it, to the point where it's much much
: easier to generate total and utter crap with it. Quite frankly, even if the
: choice of C were to do nothing but keep the C++ programmers out, that in
: itself would be a huge reason to use C."
: http://twlevo.blogspot.com/2010/06/linus-on-c-usage-is-bad-thin
k*g
65 楼
to xiaozhu,
smart people use the good part of c++,
silly people use the bad part of c++.
for example, silly programmers use some very special little things or tricks
. that's really silly. that not only introduces bugs also raise maintenance
fees.
by the way, the thred is the pk between fortran and c++
not the pk between c and c++.
even comparing the common part, the structural programming part of c++ is
much better than c.
when i develop software, only really standard oop stuff will be used. other
oop stuff, if developed by general practioners and if can be anyway kind of
replaced by structral action oriented programming, then will not be adopted.
smart people use the good part of c++,
silly people use the bad part of c++.
for example, silly programmers use some very special little things or tricks
. that's really silly. that not only introduces bugs also raise maintenance
fees.
by the way, the thred is the pk between fortran and c++
not the pk between c and c++.
even comparing the common part, the structural programming part of c++ is
much better than c.
when i develop software, only really standard oop stuff will be used. other
oop stuff, if developed by general practioners and if can be anyway kind of
replaced by structral action oriented programming, then will not be adopted.
t*z
66 楼
I have to change my mind recently. C++ is the trend in the future. Fortran
is dying even in the numerical computational field.
is dying even in the numerical computational field.
t*n
67 楼
准备写书了。那位参与?
Programing in Engineering by C++
Programing in Engineering by C++
x*u
69 楼
Is there a good book on oop? Thanks!
tricks
maintenance
【在 k*********g 的大作中提到】
: to xiaozhu,
: smart people use the good part of c++,
: silly people use the bad part of c++.
: for example, silly programmers use some very special little things or tricks
: . that's really silly. that not only introduces bugs also raise maintenance
: fees.
: by the way, the thred is the pk between fortran and c++
: not the pk between c and c++.
: even comparing the common part, the structural programming part of c++ is
: much better than c.
tricks
maintenance
【在 k*********g 的大作中提到】
: to xiaozhu,
: smart people use the good part of c++,
: silly people use the bad part of c++.
: for example, silly programmers use some very special little things or tricks
: . that's really silly. that not only introduces bugs also raise maintenance
: fees.
: by the way, the thred is the pk between fortran and c++
: not the pk between c and c++.
: even comparing the common part, the structural programming part of c++ is
: much better than c.
l*G
72 楼
C++ 没有复数类型!
相关阅读
关于Matlab+CUDA问题求教ask a question about random sampling请教fortran debuger极浅显编序号常识凸显有序号数n>一切整数如何将Matlab图动画显示?寻申请Information Systems方向的朋友菜鸟弱问:怎么在windows 里面使用GUN octave问关于linux realtime,请高手帮忙!matlab函数求教一个mathematica 问题 请教visual studio 支持 C吗?matlab imagesc colorscale, ask for help请问用qsub file比用nohup ./file &有什么好处吗?请问一个函数传递结构的初级问题求救:我的T61有50G空间不见了。谢谢ask a matlab questiontransfer上美国大学请教大侠们,关于linux美国动画工作者工资水平请教obstacle或其他人: how to install RANLIB for FORTRAN?