gpt4 book ai didi

perl - 为什么 Perl 中有这么多 "magic"?

转载 作者:行者123 更新时间:2023-12-03 15:04:13 24 4
gpt4 key购买 nike

翻阅perlsubperlop联机帮助页我注意到那里有很多对“magic”和“magical”的引用(只需在其中搜索“magic”即可)。我想知道为什么 Perl 对它们如此丰富。

一些例子:

print ++($foo = 'zz')            # prints 'aaa'       
printf "%d: %s", $! = 1, $! # prints '1: Operation not permitted'
while (my $line = <FH>) { ... } # $line is tested for definedness, not truth
use warnings; print "0 but true" + 1 # "0 but true" is a valid number!

最佳答案

当 Perl 功能被描述为“神奇”时:

It means that that feature is implemented by NBA star Magic Johnson. Whenever Perl executes "magic", it is actually sending an RPC call to a remote receiver implanted in Magic himself. He computes the answer, and then sends a return message. The use of Mr. Johnson for all the hard parts of Perl provides a great abstraction layer and simplifies porting to new platforms. It's way easier than, say, the Apache Portable Runtime.



来源: perrin on Perl Monks

这是官方的! Perl 更神奇。

来自以下 Google 搜索的命中:
 25  site:ruby-doc.org     magic
36 site:docs.python.org magic
497 site:perldoc.perl.org magic

关于perl - 为什么 Perl 中有这么多 "magic"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2285130/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com