[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Closure of lexical environment in Scheme closures
- From: Matt Hellige <matt@...>
- Date: Thu, 11 Nov 2004 15:37:29 -0600
[Brian Casiello <bcasiello@gmail.com>]
>
> So it's the fact that assigments (i.e. set!) are allowed, not the
> closure issue (since closures are handled the same way as scheme),
> that make lua not a purely functional language?
>
Yes, basically. Scheme is also most emphatically *not* a purely
functional language, since it provides set! and many side-effecting
i/o operations. Scheme, Standard ML and friends are usually considered
"mostly-functional" languages, since they encourage programming in a
functional style, but rely on non-referentially transparent operations
at a basic level.
For a much more rigorous (and quite beautiful, although challenging)
attempt to enforce a purely functional style, take a look at Haskell.
Be aware, though, that it's designers titled a relatively recent talk
"Wearing the Hair Shirt: a Haskell Retrospective," so it's not all
roses in purity-land... ;)
Matt
--
Matt Hellige matt@immute.net