定义过度出租的优点 [英] Advantages of define over let
问题描述
在与 Racket 的主要作者之一 Matt Flatt 的对话中,我被告知(顺便)社区不推荐使用 let
形式,主要被 define
取代.
define
与 let
相比有哪些优势,会促使 Racket 社区选择使用它来代替 let
?>
减少向右漂移"
参见第 4.2 节的定义:https://docs.racket-lang.org/style/Choosing_the_Right_Construct.html
也就是说,我认为这主要是一种品味问题.
During a conversation with Matt Flatt, one of the primary authors of Racket, I was told (in passing) that the let
form is not recommended by the community and is largely being replaced by define
.
What are the advantages of define
over let
that would prompt the Racket community to elect to use it in place of let
?
For reference, define and let from the Racket documentation are linked here.
"To reduce rightward drift"
See the section 4.2 on definitions: https://docs.racket-lang.org/style/Choosing_the_Right_Construct.html
That said, I see it mostly as a matter of taste.
这篇关于定义过度出租的优点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!