From: Sean O'Dell Date: 2004-07-10T00:14:16+09:00 Subject: Re: Functional Ruby (Re: Why I don't use Ruby.) On Friday 09 July 2004 05:02, Florian Gross wrote: > Sean O'Dell wrote: > > > > You can have variables in a functional language, but what you can't have > > are globals that act statefully, causing any functions you write to > > return different values when passed the same parameter values. You can > > have (pseudocoded): > > As far as I know LISP does indeed have closures -- and I can emulate > globals with them in Ruby like this: > > Oh, and about not having side-effects: Most functional languages have > them when doing I/O. I don't remember closures from my LISP days, but perhaps that's a memory issue. I/O has always been an exception, but I think you have to have exceptions to get variance into the program and I/O is a common programming paradigm and a great way to introduce variance. Sean O'Dell