> I.e. you can teach Java without teaching generics or anonymous inner
classes.
but you shouldn't -
if you can teach the type-correct use of arrays (it's done for decades),
then you can teach generic collections (at least their proper usage),
and what's the problem with the anonymous class in
x.addActionListener(new ActionListener(){ void actionPerformed(..){..}});
back to the original question (see subject): one advantage that gets
easily overlooked
is lazy evaluation, leading to better modularization, because you can
decouple
object (stream) generation from transformation from consumption,
and still be space efficient. with eager evaluation this would require
jumping through many hoops,
destroying the logical structure of the program.
and once you're lazy, then it's mandatory to be pure.
Cf. one of the classical (1984!) answers to the "advantages" question:
John Hughes: why functional programming matters,
http://www.math.chalmers.se/~rjmh/Papers/whyfp.html
Best regards, J.W.
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell