3 ms·
> GOAL encourages an imperative programming style: programs tend to consist of a sequence of events to be executed rather than the functional programming style
by SomeCallMeTim 8y ago
> GOAL encourages an imperative programming style: programs tend to consist of a sequence of events to be executed rather than the functional programming style of functions to be evaluated recursively.
That alone is a pretty hard condemnation of LISP/functional for games.
It's not really LISP/Scheme at that point, but a LISP-ish syntax for an imperative language.
Some tasks are more innately imperative. Games (and game scripting) are in that category. Trying to force game programming to work in FP is like trying to build a computer in Minecraft: It's cool to see that it can be done, but it doesn't say anything about whether it should be done.
Proving Turing Completeness doesn't mean you would want to actually write code in a Turing Machine.
- zeveb 8y agoLisp isn't a functional language (in the sense that you appear to mean; it has functions as a first-class type, of course, but that's different). This code is imperative: (tagbody start (decf x) (format t "~a~%" x) (when (plusp x) (go start))) Lisp works just fine in imperative contexts.
- wk_end 8y agoIn what sense is Lisp not an imperative language?
- TeMPOraL 8y agoLisp never was about functional programming (even if, in some way, it has invented it, or at least introduced the important building blocks). The Lisp family grew to be about symbolic computation, interactive development, and ability to modify the language to fit your needs (via macros) - which essentially eliminates whole classes of boilerplate, and allows you to directly express abstractions that cannot be specified cleanly in other languages. Imperative is normal for most Lisps.
- lliamander 8y agoJust curious, but what do you mean by symbolic computation? Do you just mean evaluating mathematical expressions in a symbolic fashion (as opposed to numeric calculations), or do you mean something more general?
- TeMPOraL 8y agoYes, both. AFAIK symbols in Lisp were originally intended to support AI research, but part of that is being able to do symbolic manipulation and computation, be it analysis, algebra or logic.