Path: utzoo!attcan!uunet!ncrlnk!ncrcae!ece-csc!mcnc!rti!sas!bts
From: bts@sas.UUCP (Brian T. Schellenberger)
Newsgroups: comp.lang.forth
Subject: Re: Functional Programming
Keywords: What is it?
Message-ID: <628@sas.UUCP>
Date: 22 Sep 88 23:21:44 GMT
References: <180@kadsma.kadsm>
Reply-To: bts@sas.UUCP (Brian T. Schellenberger)
Organization: SAS Institute Inc, Cary NC
Lines: 17

In article <180@kadsma.kadsm> brunjes@kadsma.UUCP (Roy Brunjes) writes:
|I have seen several postings lately talking about functional programming and
|how suitable Forth is for that.  My question is, I hope, more simple.  What
|IS functional programming?  

Functional program is where you program without side effects.  That is, 
whenever you call something, it only returns information and does not
set global variables and so on.  It is most commonly associated with LISP.

In most languages, it is bloody awkward because returning multiple values
is awkward or impossible.  In FORTH it's easy--in fact, setting global
variables is what's relatively awkward in FORTH.
-- 
--Brian,                     __________________________________________________
  the man from              |Brian T. Schellenberger   ...!mcnc!rti!sas!bts
  Babble-On                 |104 Willoughby Lane     work: (919) 467-8000 x7783
____________________________|Cary, NC   27513        home: (919) 469-9389