On Tuesday 13 July 2004 13:02, bruno modulix wrote:
> Sean O'Dell a ?crit :
> > On Monday 12 July 2004 13:52, bruno modulix wrote:
> >>Hal Fulton a ?crit :
> >>>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.
> >>
> >>"without assignment" should in fact read "without re-binding". Binding a
> >>value to a symbol is perfectly legal even in Haskell, but once bound,
> >>it's for the lifetime of the symbol...
> >
> > I don't understand how assignment, or even just re-binding, effects the
> > nature of a functional programming language.
>
> If you can rebind a symbol then you have states and side-effects...

If the symbol is local to a function, what side-effect could there be?

> > From everything I remember about
> > functional languages, the only real evil was persistent data that could
> > cause function results to change from one call to another.  You're not
> > supposed to have operators in a functional language, like =, *, + and so
> > on,
>
> Please stop saying stupidities. Of course functional languages can have
> operators, as you would now if you had STFW. BTW, an operator is usually
> nothing more than syntactic sugar for a function call.

Keep it polite, will you?  No, functional languages are not supposed to have 
operators.  That's why they're called "functional languages"; they work like 
functions.

> > so you can't
> > assign values "a=10" style, but you should be able to say set(a, 10).
>
> Where is exactly the difference from a semantic POV ?

Functional languages set the variable in a functional way.

> > What does assignment or even re-binding have to do with the "functional
> > nature" of a functional language?  Not a troll, I truly just don't see
> > the relationship between the two.
>
> It has to do that the definition of a 'pure' fpl include the
> impossibility to re-bind a symbol.

Facts don't exist in a vacuum; to understand what a functional language truly 
is, you have to go beyond simply repeating the rules back to people.  You 
have to know why those rules are there, you have to understand them and the 
nature of a functional language.  I see no reason to allow re-binding in a 
local context in a functional language.

	Sean O'Dell