In Common Lisp, we have to use the let
form to declare a new lexically-scoped variable. This means that the code either looks like that written in C89 (all variables declared on top of scope), or acquires unreadably deep nesting. let*
is somewhat useful, but is not always applicable.
Scheme 'solves' this problem by having a define
form, that allows a lexical variable to be declared without creating a new nesting level.
So, the question is, is it possible to have Scheme-like variable declarations in Common Lisp, that do not increase the nesting level?