加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

Greenspun在Perl的第10条规则?

发布时间:2020-12-15 23:30:53 所属栏目:大数据 来源:网络整理
导读:Greenspun’s Tenth Rule of Programming是计算机编程中的常见格言,尤其是编程语言圈.它指出: Any sufficiently complicated C or Fortran program contains an ad hoc,informally-specified,bug-ridden,slow implementation of half of Common Lisp. 问题
Greenspun’s Tenth Rule of Programming是计算机编程中的常见格言,尤其是编程语言圈.它指出:

Any sufficiently complicated C or Fortran program contains an ad hoc,informally-specified,bug-ridden,slow implementation of half of Common Lisp.

问题是,

>你会认为Perl翻译是真的吗?只有客观论点(例如,Common Lisp的哪些功能在解释器中实现)
>独立地,是否存在完全在Perl中实现的Lisp(或者至少是一个临时的,非正式指定的,错误驱动的,一半Common Lisp的慢速实现)?

解决方法

你可能喜欢Mark Jason Dominus的 Higher-Order Perl的 preface(以及本书的其余部分),其主题基本上是你的问题.他说:

If you pick up a good book about Lisp,there will be a section that describes Lisp’s good features. For example,the book Paradigms of Artificial Intelligence Programming,by Peter Norvig,includes a section titled What Makes Lisp Different? that describes seven features of Lisp. Perl shares six of these features; …

Mark has many other things to say about Lisp and Perl

所以,Perl实际上已经是Lisp了,但我说既不慢也不是一半.然而,Mark指出的关于Perl和Lisp之间差异的一点是Perlers处理非结构化字符串(一般情况下),而Lispers只要有可能就处理结构化数据. Perl可以做到这一点,但Perlers倾向于不这样做.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读