3 ms·
Practicality beats purity. Without setcar! setcdr! and friends R4RS Scheme is functional, and with these it is mostly-functional, which is good-enough. Racket
by lngnmn 10y ago
Practicality beats purity.
Without setcar! setcdr! and friends R4RS Scheme is functional, and with these it is mostly-functional, which is good-enough.
Racket, BTW, evolved mcons to make this distinction explicit.
Common Lisp, obviously, cannot be called functional, but it is trivial to derive a good-enough mostly-functional subset of Common Lisp. Actually, CL, being a kitchen sink for many dialects of Lisp, notably the one from Symbolics, cannot be as balanced and refined as early Schemes used to be, because it incorporates lots of "destructive" primitive procedures, without marking them explicitly in any standardized way or packaging them in a separate package, which, arguably, would make writing a mostly-functional CL code much easier.