Skip to Content
流畅的Python(第2版)
book

流畅的Python(第2版)

by Luciano Ramalho
April 2023
Intermediate to advanced
769 pages
25h 16m
Chinese
Posts & Telecom Press
Content preview from 流畅的Python(第2版)
190
7
杂谈
Python
是一门函数式语言吗
2000
年的某一天,我参加了
Zope
公司在美国组织的一场讲习班,期间
Guido van Rossum
到访了教室(他不是讲师)。在课后的问答环节,有人问他
Python
的哪些功能是从其
他语言借鉴而来的。他答道:“
Python
中一切好的功能都是从其他语言中借鉴来的。”
布朗大学计算机科学教授
Shriram Krishnamurthi
在其论文“
Teaching Programming
Languages in a Post-Linnaean Age
”的开头这样写道:
编程语言“范式”已近末日,是旧时代的遗留物,令人厌烦。既然现代语言
的设计者对范式不屑一顾,那么我们的课程为什么要像奴隶一样对其言听计
从呢?
在该论文中,下面这一段点名提到了
Python
Python
Ruby
Perl
这些语言还要了解什么呢?它们的设计者没有耐心
去精确实现林奈层次结构,设计者按照自己的意愿从别处借鉴功能,创建出
完全无视过往概念的大杂烩。
Krishnamurthi
指出,不要试图把语言归为某一类;相反,应把语言视作功能的聚合。
7.10
节提到的“
Beyond Paradigms
”演讲就受到了他的影响。
Python
提供一等函数打开了函数式编程的大门,不过这并不是
Guido
的本意。他在
Origins of Python
s Functional Features
”一文中说,
map
filter
reduce
的最初目的
是为
Python
增加
lambda
表达式。这些功能都由 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python高级编程(第2版)

Python高级编程(第2版)

Posts & Telecom Press, Michał Jaworski, Tarek Ziadé
Kafka权威指南(第2版)

Kafka权威指南(第2版)

Gwen Shapira, Todd Palino, Rajini Sivaram, Krit Petty
Python贝叶斯分析(第2版)

Python贝叶斯分析(第2版)

Posts & Telecom Press, Osvaldo Martin

Publisher Resources

ISBN: 9787115612366