Sean O'Dell wrote:

>>> You're not supposed to have operators in a functional language,
>>> like =, *, + and so on,
>> BTW, an operator is usually nothing more than syntactic sugar for a
>> function call.
> No, functional languages are not supposed to have operators.  That's
> why they're called "functional languages"; they work like functions.

Most of those operators are exactly like functions. = isn't if its an
assignment operator, but if it is an comparison operator it indeed is
compatible to the definition of the function.

(Just because there's a different syntax for applying it doesn't mean
that it's really different -- in fact in LISP + is just a function with
a special name without any additional syntactic sugar.)

>>> 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.

Functional languages don't enforce a specific syntax like function(arg1,
arg2) etc., but they indeed specify that a function should have no side
effects which means that the only way it should be able to interact with
the outside world is by returning values. (Lambda calculus is the origin
of functional languages and compared to computer languages its syntax is
indeed very exotic.)

I hope I was able to add something valuable.

Regards,
Florian Gross