posted 7 years ago
I am not at all a specialist of game development, but I think functional programming can benefit to all types of programming. At least, some principles apply. Being purely functional at any cost is an interesting brain challenge. A very interesting one, but when it comes to productivity, you have to use the best tools at you disposal. Separating pure functions from effects is always a good thing, and many good imperative programmers do it without thinking about being functional. Using immutable data structures brings safety, but there might be a performance cost if you work with libraries and/or frameworks that impose different data structures. Pushing abstraction to the limit is often useful in order to really understand the true nature of the problem you are handling, but it is sometimes more efficient not to push abstraction too far. The important thing is to see the abstraction in order to be able to make an educated choice, instead of reproducing "best practices" again and again. As Erik Meijer, once said, "Think like a fundamentalist and code like a hacker". (If you don't know who is Erik Meijer, search for him on Youtube!)