This is a special case of this question that I feel is particularly pertinent.
I'm working on a game for Android, and I'm planning on using Scala with libgdx. I'm planning on making a performant game, but not necessarily hyper-performant game. I saw libgdx's documentation on Garbage Collection, and this makes me think:
- Functional programming implies lots of immutable objects.
- Therefore, mutating an object requires making a new object.
- Thus, lots of objects get garbage collected, which degrades performance.
Is this an insurmountable problem? Are there any other significant problems with functional style on Android?
For gaming? Avoid functional languages. Interesting that the 2010 Google AI Challenge was won by a Lisp bot. Might be no good for writing games, but it's apparently pretty handy when it comes to playing them. http://semanticweb.com/lisp-bot-wins-google-ai-challenge-will-lisp-win-in-the-semantic-web-too_b17012
– Feb 06 '13 at 21:34For gaming? Avoid functional languages. Their entire paradigm fails to mesh well with games.
Actually I've read some articles from high profile game developers expressing an intrest in functional programming. There was one by Tim Sweeney http://www.scribd.com/doc/5687/The-Next-Mainstream-Programming-Language-A-Game-Developers-Perspective-by-Tim-Sweeney and John Carmack seems to have an active intrest in evaluating functional languages and is currently doing a port of Wolfenstein 3d in Haskell, http://tinyurl.com/cnzx57u – James McMahon Jun 03 '13 at 02:56Practically all of the run-time code (approximately half a million lines of source code) was written in GOAL (Game Object Assembly Lisp)
– James McMahon Jun 03 '13 at 02:58