定义过度出租的优点 [英] Advantages of define over let

查看:35
本文介绍了定义过度出租的优点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在与 Racket 的主要作者之一 Matt Flatt 的对话中,我被告知(顺便)社区不推荐使用 let 形式,主要被 define 取代.

definelet 相比有哪些优势,会促使 Racket 社区选择使用它来代替 let?>

作为参考,definelet 链接在此处.

解决方案

减少向右漂移"

参见第 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屋!

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