This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: why undefined return values?
Telford Tendys <telford@eng.uts.edu.au> writes:
> > It is a good idea to try to avoid these altogether. It's likely that
> > such operations won't be as efficient as purely functional code in
> > future Scheme compilers and interpreters.
>
> I've gotten a little wary of the claims for functional programming.
> At the end of the day every language needs a namespace and every programmer
> needs to modify that namespace -- what is this if not an imperative
> operation?
There's a big difference between facilities for writing code and the
style of the code itself. E.g., one can imagine a functional language
in which the development environment does "imperative" operations.
> When functional programming works, there are a lot of niceties in the way it
> works, but it never completely works. Which is not to suggest that we should
> throw it out the window, just that being a purist is guaranteed to make you
> worse off being pragmatic.
I expressed myself in a bad way above: I didn't want to say that one
shouldn't use the set! operations at all.
I only wanted to say that in most cases they are not needed, and
avoiding to use them in such cases often leads to clearer code.
There's a resistance in the beginning, but once you are used to
express yourself functionally it works just fine. That said, I
certainly still use set! et al. in many situations.