[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can a functional language be sequential?
On 2003.06.02 10:41 John Clements wrote:
> Typically, "sequences" are given the meaning "evaluate all of these, then
> return the value of the last one." In such a situation, in a language with
> no side effects, there would be no reason to have such a construct, because
> evaluating expressions other than the last one would have no effect on the
> computation (aside from non-termination and errors). I'm guessing that your
> sequences of definitions and constructors actually mutate some global
> namespace. Perhaps the real question is what you consider to be "mutation".
In Bento, a sequence means "evaluate all of these; if there are more than
one, concatenate the values in sequence; return the resulting value". I
don't believe there's any way in Bento to mutate the global namespace (except
maybe for modifying the source code and restarting the interpreter).
Michael St. Hippolyte