[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can a functional language be sequential?




   Date: Sun, 1 Jun 2003 15:40:32 -0400
   From: "Michael St . Hippolyte" <mash@brooklyndigital.net>
   To: ll1-discuss@ai.mit.edu
   Subject: Can a functional language be sequential?
   
   Forgive my ignorance of what must be a pretty basic point,
   but I'm wondering if the language I'm working on, Bento, can
   accurately be labeled a functional language.
   
   A Bento program consists of a hierarchy of object definitions;
   each definition may contain further definitions as well as
   zero or more constructions.  When a Bento object is
   instantiated, the constructions in the associated definition
   are evaluated in sequence.
   
   The constructions in such sequences obey the constraints of a
   function in functional programming as I understand them (i.e.,
   no mutable variables and no side effects), and I don't see how
   putting functions in an ordered list would change this.  But
   the functional languages I've seen all seem to avoid any hint
   of sequential programming.  Is this simply a point of style,
   or does allowing sequences of functions disqualify a language
   from being called functional?

Let me ask a question first, the answer to which may
shed some light: why is it specified in Bento that the
constructions be evaluated "in sequence"?  Would it
make a difference if the constructions were evaluated
in some arbitrary order, or concurrently?  If so, what
difference would it make?

--Guy Steele