Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!apple!vsi1!altnet!uunet!mcvax!ukc!strath-cs!glasgow!orr From: orr@cs.glasgow.ac.uk (Fraser Orr) Newsgroups: comp.lang.forth Subject: Re: Functional Programming Message-ID: <1721@crete.cs.glasgow.ac.uk> Date: 10 Oct 88 17:42:40 GMT References: <180@kadsma.kadsm> <628@sas.UUCP> <9714@cup.portal.com> Reply-To: orr@cs.glasgow.ac.uk (Fraser Orr) Organization: Comp Sci, Glasgow Univ, Scotland Lines: 32 In article <9714@cup.portal.com> Paktor@cup.portal.com writes: > >In article <1015.3.219.2 Re: Functional Programming> > <9/22/88 16:21 bts@sas.UUCP (Brian T. Schellenberger)> > writes, referring to functional programming: > >> 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. > >To the latter assertion, I reply: Au contraire, mon frere; setting global > variables in Forth is just as piece-of-cakey as pie. Indeed you are correct. Of course, the inability to return multiple values in most programming languages is merely a deficiency in the syntax of that language. I see no reason why it cannot be done (moreover why it cannot be done in a type secure manner.) I might also say that provision is made for this in Miranda (and other Functional languages') syntax. I might say that altough seting and using global variables is not as easy as the use of the stack in forth (though as David Paktor points out it isn't really that hard), I find the original poster's self righteous attitude ammusing. He seems to imply that when forth was designed they decided that they would make global access deliberately more dificult to discourage it. In reality though it is clear that global variables were added as a "useful" hack. >David Regards, ===Fraser