[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can a functional language be sequential?
- To: Matt Hellige <address@hidden>
- Subject: Re: Can a functional language be sequential?
- From: "Michael St . Hippolyte" <address@hidden>
- Date: Tue, 3 Jun 2003 10:38:41 -0400
- Cc: address@hidden
- In-reply-to: <20030602235536.N826@localhost.inet>; from email@example.com on Mon, Jun 02, 2003 at 23:55:36 -0400
- References: <20030602235536.N826@localhost.inet>
- Sender: address@hidden
On 2003.06.02 13:03 Matt Hellige wrote:
> When pure functional programmers say something is without side
> effects, they mean side effects OF ANY KIND. Using the term in a less
> precise way will certainly get you in hot water in some circles
As long as "hot water in some circles" refers to hot tubs, I don't
Based on your comments and others', I can see that because it does
not entirely rule out side effects, Bento is not strictly speaking
a functional language.
But the side effects in Bento are entirely from external calls; if
there were no external calls, or if they were rendered somehow
"side effect free" (e.g. via monads), there would be no side
effects. I can see that this would be a good thing, and plan to
look at monads and other features which could eliminate or at
least put constraints on external side effects.
I'm still left wondering whether putting expressions in a sequence
which describes the order of assembly of the resulting values, not
the order of evaluation, in and of itself disqualifies a lanugage
from being functional. Since it does not introduce any side
effects (barring fatal errors and nontermination), it seems to me
it could still be considered functional, technically if not
stylistically. Or am I missing something?
This is slightly more than academic, since Bento programs do not
always need external calls. Input data can be passed in from the
outside before the program starts, and output is generally implicit
at program termination (the output simply consists of the final
result of the evaluation). External calls must be explicitly
enabled by the "extern" keyword at the head of the file, so the
absence of this keyword in a Bento program should indicate that the
program is free of side effects. Or once again, am I missing
Michael St. Hippolyte