Guido van Rossum的摩风音乐 [英] A Moronicity of Guido van Rossum

查看:52
本文介绍了Guido van Rossum的摩风音乐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Guido van Rossum的Moronicity


Xah Lee,200509

http://www.artima.com/weblogs/viewpost。 jsp?thread = 98196

日期为20050826,他沉思着他想要删除

lambda,reduce(),filter()和map ()未来版本中的构造

Python 3000.


Guido写道:

??过滤器(P,S)是几乎总是写得更清楚,因为[x代表

P(x)] x,这有一个巨大的优势,即最常见的用法

涉及谓词比较,例如x == 42,并为此定义一个

lambda只需要为读者付出更多努力(加上

lambda比列表理解慢)? />

形式a ?? [如果P(x)为x,则x为x中的x]肯定不比

a ??过滤器(P,S)a ??更清楚。后者显然是一种功能。他妈的是什么?
前者?任何语言的每个程序员都可以理解

并欣赏它的形式和功能。什么他妈的任何人

希望每个人都欣赏Python的语法特质a ?? [x

for ...] a ???


也是,来自a ??过滤器(F,S)的论证a ??很麻烦

,因为第一个参数是一个函数,而且很可能它是一个函数返回true和false因此大多数人将会b / b
可能使用形式一个?? lambdaa ??这是非常麻烦的,如果

整个事情是用语法特性写的?[x for

....] a ??,相当无聊,正如你现在所看到的那样。


过滤器(decision_function,list)表格干净,简洁,并且有助于

思考。为什么它有助于思考?因为它以最清晰的方式将整个

操作浓缩为其数学本质。也就是说,

它过滤,列表和是/否决策功能。什么都没有?b $ b更多,没有什么可以少。遗憾的是,我们拥有由技术爱好者中的蠢货开发的

行话Lambda和Predicate

的功能编程社区。 lambda可以重命名

Pure Function和Predicate可以被称为True / False函数,

但是世界已经成为他们已经存在的方式,重写是不明智的每个现有的Perl程序都只是因为有人发明了另一种

语言。


如果filter()中lambda中的谓词很麻烦,所以确切地说

同样的东西出现在语法特质中?[x中的x是x / / b
如果P(x)] a ??。


Guido在事后添加了这个刺痛:

??(加上lambda比列表理解慢)??


哪个更快,实际上是Python

执行器的奇思妙想和容量。就在我们使用简单标准之前。

每个程序员都能理解的功能概念,他妈的是什么

a列表理解?

为什么不在Python 3000中废弃列表理解并创建一个

table()函数,它在语法上更简单,在

语义中更强大? (参见 http://xahlee.org/perl-python/list_comprehension.html




Guido写道:

??为什么要放弃lambda?大多数Python用户不熟悉Lisp或

Scheme,所以这个名字令人困惑;还有一个普遍存在的误解是lambda可以做嵌套函数不能b / b的事情 - 我还记得Laura Creighton的'Aha!-erlebnis在我给她看了

之后没有区别!即使有一个更好的名字,我认为并排两个选择只需要程序员考虑

做出一个与他们的程序无关的选择;没有

选择简化了思考过程。另外,一旦map(),filter()和

reduce()都消失了,那么你真的很多地方都不需要写b / b
需要写得很短地方职能; Tkinter回调来了

介意,但我发现回调应该是

一些状态载体对象的方法(例外是玩具

程序)。??


一开始,Guido就假设了一套关于Python

用户以及他们熟悉的内容。 10年前的Python用户并不是今天相同的Python用户,如果你砍掉lambda,那么今年的用户肯定不会相同10美元。事情发生变化,数学素养会增加,b $ b会有所进步,你所拥有的用户会随着你的变化而变化。一个纯粹的

函数(lambda)是用b / b
计算机语言体现的数学思想的要点,而不是来自LISP或Scheme的技术geeking

笨蛋不会想。


Guido写道:

?? ...普遍的误解是lambda可以做的事情

,一个嵌套的函数不能...... ??


一个人在行业引人注目的东西如此侮辱

然后把它击落,好像显示出他的聪明才智。


lambda是函数的语法或

函数概念的名称。他妈的这意味着lambda并不像

嵌套函数那么强大?


Python中的lambda非常恶心。它首先设计有一个内置的

限制,并且在诸如Pythoners之类的势在必行的人群中被视为一些异物

。如果有任何问题

使用lambda,那就是使用Python中的lambda和Pythoner的态度。


Guido写道:

??另外,一旦map(),filter()和reduce()都消失了,那么你不需要写很多地方的很多地方 $ b br />
函数; ??


当然,你开始用三千字写一些像Java这样的东西

只是为了陈述你是一个白痴。


删除语言中的元素通常不是一个好主意。

删除强大的功能,以便蠢货可以使用它是愚蠢的。 (例如

Java)删除?? redundanta ??构造并不总是聪明的(例如

Scheme),因为它扼杀了实用性。删除现有语言

通过有远见的升级功能非常愚蠢。它强迫

不必要的改变并导致死亡。


Guido写道:

??所以现在减少()。这实际上是我一直讨厌的那个

最多,... ??


Python中存在reduce()可能是由于技术geeking

计算行业的小丑。基本上,没有人真正清楚地了解数学或计算语义,但每个精英都知道各种语言的构造包。那么,你加上这个,我想要那个,而且这个语言变成了一个不连贯的soup
构造的汤,带着强烈的反对想要再次砍掉东西,用

那个好东西。


建议:lambda,reduce(),filter()和map()都应该留下来。我不知道究竟是什么'是Python 3000的来龙去脉。如果有人希望

根据愿景动摇:不要''吨。已有

众多语言和愿景;这个世界真的不需要另外一个

bigshot'因为他们的个人进步而说。至于改进,应该扩展Python中的
lambda以消除其内置的限制

(和Pythoners等命令式编程人群应该停止使用

lambda态度问题)。函数map()也可以被认为是扩展的
。 (参见a?计算机语言中的表达式是什么?

at http://xahlee.org/perl-python/what_i...esiveness.html )函数

reduce()应该保留,因为它已经存在,即使它不是很有用也很奇怪。 filter()应该保持原样,因为它很棒,并且

正确。


---------

此帖子存档于:
http:// xahlee。 org / perl-python / python_3000.html


Xah
xa * @ xahlee。组织

a ?? http://xahlee.org/

A Moronicity of Guido van Rossum

Xah Lee, 200509

On Guido van Rossum''s website:
http://www.artima.com/weblogs/viewpost.jsp?thread=98196
dated 20050826, he muses with the idea that he would like to remove
lambda, reduce(), filter() and map() constructs in a future version
Python 3000.

Guido wrote:
??filter(P, S) is almost always written clearer as [x for x in S if
P(x)], and this has the huge advantage that the most common usages
involve predicates that are comparisons, e.g. x==42, and defining a
lambda for that just requires much more effort for the reader (plus the
lambda is slower than the list comprehension)??

the form a??[x for x in S if P(x)]a?? is certainly not more clear than
a??filter(P, S)a??. The latter is clearly a function. What the fuck is
the former? A function every programer in any language can understand
and appreciate its form and function. What the fuck would anyone to
expect everyone to appreciate a Python syntactical idiosyncrasy a??[x
for ...]a???

also, the argument that the from a??filter(F,S)a?? being cumbersome
because the first argument is a function and that mostly likely it
would be a function that returns true and false thus most people will
probably use the form a??lambdaa?? and that is quite cumbersomethan if
the whole thing is written with the syntactical idiosyncrasy a??[x for
....]a??, is rather inane, as you can now see.

The filter(decision_function,list) form is clean, concise, and helps
thinking. Why it helps thinking? Because it condenses the whole
operation into its mathematical essence with the most clarity. That is,
it filters, of a list, and by a yes/no decision function. Nothing is
more, and nothing can be less. It is unfortunate that we have the
jargon Lambda and Predicate developed by the morons in the tech geekers
of the functional programing community. The lambda could be renamed
Pure Function and the Predicate could be called True/False function,
but the world being the way they are already, it is unwise to rewrite
every existing Perl program just because somebody invented another
language.

If the predicate in lambda in filter() is cumbersome, so would exactly
the same thing appear in the syntactical idiosyncrasy a??[x for x in S
if P(x)]a??.

Guido added this sting as a afterthought:
??(plus the lambda is slower than the list comprehension)??

Which is faster is really the whim and capacity of Python
implementators. And, just before we were using criterion of simplicity.
The concept of a function every programer understands, what the fuck is
a List Comprehension?
Why don''t you scrap list comprehension in Python 3000 and create a
table() function that''s simpler in syntax and more powerful in
semantics? ( See http://xahlee.org/perl-python/list_comprehension.html
)

Guido wrote:
??Why drop lambda? Most Python users are unfamiliar with Lisp or
Scheme, so the name is confusing; also, there is a widespread
misunderstanding that lambda can do things that a nested function can''t
-- I still recall Laura Creighton''s Aha!-erlebnis after I showed her
there was no difference! Even with a better name, I think having the
two choices side-by-side just requires programmers to think about
making a choice that''s irrelevant for their program; not having the
choice streamlines the thought process. Also, once map(), filter() and
reduce() are gone, there aren''t a whole lot of places where you really
need to write very short local functions; Tkinter callbacks come to
mind, but I find that more often than not the callbacks should be
methods of some state-carrying object anyway (the exception being toy
programs).??

In the outset Guido here assumes a moronitude about the set of Python
users and what they are familiar of. Python users 10 years ago are not
the same Python users today, and will certainly not be the same 10
years later if you chop off lambda. Things change, math literacy
advances, and what users you have changes with what you are. A pure
function (lambda) is the gist of a mathematical idea embodied in
computer languages, not something from LISP or Scheme as tech geeking
morons wont to think.

Guido wrote:
??... there is a widespread misunderstanding that lambda can do things
that a nested function can''t...??.

One is so insulted by a bigshot in the industry of quoting something so
disparate then shot it down as if showing his perspicacity.

A lambda is a syntax for function or a name for the concept of
function. What the fuck does it mean that a lambda isn''t as powerful as
nested function??

The lambda in Python is really ill. It is designed with a built-in
limitation in the first place, and regarded as some foreign substance
in the Imperative crowd such as the Pythoners. If there''s any problem
with lambda, it is with lambda in Python and Pythoner''s attitude.

Guido wrote:
??Also, once map(), filter() and reduce() are gone, there aren''t a
whole lot of places where you really need to write very short local
functions;??

Of course, you begin to write things like Java, in three thousand words
just to state you are a moron.

The removing of elements in a language is in general not a good idea.
Removing powerful features so that morons can use it is moronic. (e.g.
Java) Removing a??redundanta?? constructs is not always smart (e.g.
Scheme), because it pinches on practicality. Removing existing language
features by a visionary upgrade is exceedingly moronic. It forces
unnecessary shakeup and can cause death.

Guido wrote:
??So now reduce(). This is actually the one I''ve always hated
most,...??

The existence of reduce() in Python is probably caused by tech geeking
clowns of the computing industry. Basically, nobody really have a clear
understanding of mathematics or computing semantics, but every elite
tech geeker knew about bags of constructs of various languages. So, you
add this, i want that, and the language becomes a incoherent soup of
constructs, with the backlash of wanting to chop off things again, with
that good things.

Suggestions: lambda, reduce(), filter() and map() all should stay. I''m
not sure exactly what''s the ins and outs of Python 3000. If one wants
to shake things up based on a vision: don''t. There are already
gazillion languages and visions; the world don''t really need another
bigshot''s say for their personal advancement. As for improvement,
lambda in Python should be expanded to remove its built-in limitation
(and Imperative Programing Crowd such as Pythoners should cease to have
lambda attitude problem). The function map() could also be considered
for expansion. (see a??What is Expresiveness in a Computer Languagea??
at http://xahlee.org/perl-python/what_i...esiveness.html ) Function
reduce() should stay because it''s already there, even if it is not very
useful and odd. filter() should stay as it is as it is superb and
proper.

---------
This post is archived at:
http://xahlee.org/perl-python/python_3000.html

Xah
xa*@xahlee.org
a?? http://xahlee.org/

推荐答案

2005年9月29日星期四16:24,Xah Lee写道:
On Thursday 29 September 2005 16:24, Xah Lee wrote:
Guido van Rossum的一个摩羯座

Xah Lee, 200509
A Moronicity of Guido van Rossum

Xah Lee, 200509




假设你想让人们说服你的位置是正确的,为什么

你不能用恰当的语言尝试? "白痴"在你的文字中发生了7次,这不会让你看起来像一个科技蠢蛋或数学白痴,

但就像一个白痴。 br />



Assuming you want to reach people to convince them your position is right, why
don''t you try that in proper language? "moron" occured 7 times in your not
too long text, that doesn''t let you look like a tech moron or a math moron,
but just like a moron.


Michael Goettsche写道:
Michael Goettsche wrote:
假设你想让人们相信你的立场是正确的,为什么
不要你用适当的语言尝试吗? "白痴"在你的文字不太长的文本中出现了7次,这不会让你看起来像一个技术白痴或数学白痴,
但就像一个白痴。
Assuming you want to reach people to convince them your position is right, why
don''t you try that in proper language? "moron" occured 7 times in your not
too long text, that doesn''t let you look like a tech moron or a math moron,
but just like a moron.


<实际上,一个愤怒的白痴,由于在所述文本中使用了4次咒骂''他妈的''。



-


Joshua Simpson - dataw0lf.org

首席网络管理员/工程师Aero-Graphics Inc.
js ****** @ aero-graphics.com


Michael Goettsche <毫安** @ tuxipuxi.org>写道:
Michael Goettsche <ma**@tuxipuxi.org> writes:
2005年9月29日星期四16:24,Xah Lee写道:
On Thursday 29 September 2005 16:24, Xah Lee wrote:
Guido van Rossum的一个摩羯座

Xah李,200509
A Moronicity of Guido van Rossum

Xah Lee, 200509



假设你想让人们说服你的位置是对的,为什么不用适当的语言尝试呢? "白痴"在你的文字不太长的文本中出现了7次,这不会让你看起来像一个技术白痴或数学白痴,
但就像一个白痴。



Assuming you want to reach people to convince them your position is right, why
don''t you try that in proper language? "moron" occured 7 times in your not
too long text, that doesn''t let you look like a tech moron or a math moron,
but just like a moron.




他的意图绝不是说服别人或传递信息。从他那里寻找更老的

帖子,这里的人试图向他展示一些错误,或者提出建议来增加他的贡献,他只是忽略了一切。


看起来他认为他是无所不知的,而且总是很好。几乎(?)a

神。 :-)

顺便说一下,医生说与他发生矛盾是危险的...... ;-)


-

Jorge Godoy< go *** @ ieee.org>



His intent was never to convince people or pass information. Look for older
posts from him, where people here tried showing him some mistakes or made
suggestions to enhance his contribution and he simply ignored everything.

It looks like he thinks he''s omniscient and always righ. Almost (?) a
deity. :-)
By the way, the doctor said it is dangerous to contradict him... ;-)

--
Jorge Godoy <go***@ieee.org>


这篇关于Guido van Rossum的摩风音乐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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