On Thursday 08 July 2004 12:48, Hal Fulton wrote:
> James Britt wrote:
> >> There *are* good, useful definitions of what constitutes a functional
> >> languages, and Ruby does not match the criteria for most of them.
> >> Probably the most fundamental of all criteria is that the language
> >> does not allow side-effects, such as assignment.
>
> We're OT now, but my ignorance of FP is such that I can't imagine
> a language without assignment.

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):

function myfunc(a)
  b = anotherfunc(a)
  return sin(b)
end

...because b is a lexically scoped variable within myfunc.  It is created when 
the function is called, and destroyed when the function exits.  Because you 
never maintain b statically or globally, and thus b cannot be changed outside 
of myfunc, any given value you pass to myfunc will always return the same 
value, no matter when or where you call it.

	Sean O'Dell