Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advantages of define over let

Tags:

let

racket

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.

like image 621
BlackVegetable Avatar asked Feb 08 '14 21:02

BlackVegetable


1 Answers

"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.

like image 187
soegaard Avatar answered Oct 05 '22 20:10

soegaard