Hi all,

Again, I'm the new guy slowly learning this "fuctional programming" thing. :-)

I've been reading, and I'm really liking the elgance of Haskell, and FP as a whole. But I wonder about the range of applicability. You see, one of the things about FP is that there are no side-effects and the same function on the same parameters always returns the same value. But any program that interacts with the real world cannot meet those properties.

The function ask_user_name() will not return the same value each time. If write a chess program, the function get_user_move() will be different each time. And every time you update the screen, you're having a side-effect.

So, I figure that to do these tasks you heed that "do ... <-" work around. But that kills the whole point of using FP in the first place, right?

So, I'm tempted to conclude that FP is only applicable to situations where user interaction is a small part of the program. For example, for simulations.

Now, I'm sure I'm not the first person to have this train of thought. And I'm sure there is a good answer why I'm wrong. :-) I'm eager to hear what that might be.

Cheers,
Daniel.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to