Hasty Briefsbeta

Bilingual

On eval in dynamic languages generally and in Racket specifically (2011)

a year ago
  • #programming
  • #Racket
  • #eval
  • The `eval` function is central to dynamic languages like Racket but is often avoided by experienced programmers due to potential issues.
  • `eval` can be compared to instructing someone in a language they may not understand, leading to unreliable results.
  • Good uses of `eval` include scenarios where instructions are dynamically generated and passed to others, such as construction crew instructions.
  • In Racket, `eval` interacts with the module's namespace, and DrRacket sets the namespace for the interactions window.
  • Racket's default empty namespace for `eval` helps programmers remember to consider language context.
  • Security concerns highlight the need to limit `eval`'s authority and avoid quoting confusion.
  • Mike Samuel emphasizes making languages analyzable and limiting embedded scripting languages' authority.
  • A typo in the original text was pointed out by Hendrik Boom regarding a missing 'that' in a sentence about `eval`.