
On Tue, 2005-05-03 at 00:38 -0400, Daniel Carrera wrote:
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.
Others have suggested this is not always true. If you dig around you will find some computer games written in purely functional languages. I think these qualify as programs where user interaction is not a small part of the program. A very nice demonstration for the Clean programming language can be found at this link: http://www.cs.ru.nl/~clean/About_Clean/Platform_Games/platform_games.htm I believe that the low-level game environment is written in C. However, to make a new game you only need to write Clean code, the game environment is just linked in at the end. The conclusion might be in this case that C is better for the low-level bit twiddling needed for every game, but Clean is better for constructing the logic of new games. My personal experience tends to agree with this conclusion. Clean is not Haskell, but they are very closely related. Cheers, Bernie.