I'm currently reading "Common Lisp: A Gentle Introduction to Symbolic Computation".
Chapter 5 introduces let
and let*
and discusses the differences between them, and especially points out that you may be tricked into thinking to always use let*
instead of let
, but you should not do this for two reasons:
let
is easier to understand because it implies that there are no dependencies.- Section 5.6 says that there are situations where
let
is the only correct choice, but it does not go into details.
Actually, it says:
There are some situations where LET is the only correct choice, but we won't go into the details here. Stylistically, it is better to use LET than LET* where possible, because this indicates to anyone reading the program that there are no dependencies among the local variables that are being created. Programs with few dependencies are easier to understand.
So, now my question is: What are these situations where let
is the only correct choice?