# 'let' best practices

**URL:** <https://discourse.elm-lang.org/t/let-best-practices/7936>\
**Category:** Learn\
**Created:** [November 23, 2021, 12:24pm UTC](https://discourse.elm-lang.org/t/let-best-practices/7936 "2021-11-23T12:24:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mje](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mje/32/3369_2.png) [@mje](https://discourse.elm-lang.org/u/mje)\
**Post date:** [November 23, 2021, 3:47pm UTC](https://discourse.elm-lang.org/t/let-best-practices/7936/4 "2021-11-23T15:47:59Z")

</div>

SPJ’s book is mostly about non-strict languages, whereas Elm is strict, so you can’t always apply lessons from the book to Elm.

Even if that section of the book is strictness agnostic, another aspect is that the book describes translating source code to an enhanced lambda calculus where there are no temporary variables. So even if there is such a translation step in Elm, with referential transparency, `f model` and `newModel` are interchangeable, and a good compiler ought to be able recognize repeated expression and optimize them away.

---

_[View the full topic](https://discourse.elm-lang.org/t/let-best-practices/7936)._
