编码与有趣的部分的样式文章在白色空间 [英] Coding style article with interesting section on white space

查看:49
本文介绍了编码与有趣的部分的样式文章在白色空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

认为这里的一些人可能会觉得这个有趣。没有很好的启示,

只是编写可读代码的一个相当明智的部分:)


整篇文章:
http://www.acmqueue.com/modules .php?... pid = 271& page = 1


专门针对空格的部分:
http://www.acmqueue.com/modules.php? ...... pid = 271& page = 3


干杯,

尼克。


-

Nick Coghlan | nc******@email.com |澳大利亚布里斯班

--------------------------------------- ------------------------
http://boredomandlaziness.skystorm.net

Thought some folks here might find this one interesting. No great revelations,
just a fairly sensible piece on writing readable code :)

The whole article:
http://www.acmqueue.com/modules.php?...pid=271&page=1

The section specifically on white space:
http://www.acmqueue.com/modules.php?...pid=271&page=3

Cheers,
Nick.

--
Nick Coghlan | nc******@email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net

推荐答案

Thanx Nick

Thanx Nick


Nick Coghlan写道:
Nick Coghlan wrote:
想到这里的一些人可能会觉得这个有趣。没有很好的
启示,只是编写可读代码的一个相当明智的部分:)

整篇文章:
http://www.acmqueue.com/modules.php?...pid= 271& page = 1
专门针对空白区域的部分:
Thought some folks here might find this one interesting. No great revelations, just a fairly sensible piece on writing readable code :)

The whole article:
http://www.acmqueue.com/modules.php?...pid=271&page=1
The section specifically on white space:


http://www.acmqueue.com/modules.php?...pid=271&page=3


引用文章中的建议如何不用任何

语言编写FORTRAN,这些建议是合理但基本的,可以遵循Fortran

90/95/2003以及任何其他语言。让我感到愤怒的是,作者写道,好像Fortran自20世纪60年代以来一直没有进化过。它是
有。具体来说,Fortran 90


(1)允许变量名最多31个字符

(2)有一个免费的源表格

(a)没有严格的规则来启动某个特定的代码



(b)空格很大

(3)有一整套控制结构 - goto'几乎永远不需要



文章的更详细的反驳是在档案馆

Fortran 90讨论组在
http://www.jiscmail.ac.uk/cgi-bin/we...omp-fortran-90

- 搜索Fortran bashing。


Python看起来更像Fortran 90而不是其中一种花括号/分号

语言,并且两种语言都有模块和数组切片。


在发表文章之前,应该做一些研究。

Apparentl y,许多作者和编辑都懒得这样做。


http://www.acmqueue.com/modules.php?...pid=271&page=3

The suggestions in the cited article, "How Not to Write FORTRAN in Any
Language", are reasonable but elementary and can be followed in Fortran
90/95/2003 as well as any other language. What infuriates me is that
the author writes as if Fortran has not evolved since the 1960s. It
has. To be specific, Fortran 90

(1) allows variable names up to 31 characters long
(2) has a free source form where
(a) there are no rigid rules about starting code in a certain
column
(b) white space is significant
(3) has a full set of control structures -- goto''s are almost never
needed

More detailed rebuttals of the article are in the archives of the
Fortran 90 discussion group at
http://www.jiscmail.ac.uk/cgi-bin/we...omp-fortran-90
-- search for "Fortran bashing".

Python looks more like Fortran 90 than one of the curly-brace/semicolon
languages, and both languages have modules and array slices.

One ought to do a little research before publishing an article.
Apparently, many authors and editors are too lazy to do so.


文章< 11 ************* ********@z14g2000cwz.googlegroups。 com>,

< be ******* @ aol.com>写道:
In article <11*********************@z14g2000cwz.googlegroups. com>,
<be*******@aol.com> wrote:


这篇关于编码与有趣的部分的样式文章在白色空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆