Woops - Lisp IDE using LTK
2 pointsby such_a_casual6 comments
(defun udpate ()
(let ((pos (find-char-pos)))
(move-char pos))
(print (stats))
(rotate enemies))
(defun udpate ()
(set 'pos (find-char-pos))
(move-char pos)
(print (stats))
(rotate enemies))
I now have to keep this 'pos symbol in my head for the rest of the function (in another language, forever in this case), whereas in the first example I can just forget about the variable after the next line. It doesn't exist anymore. It makes code clearer and much easier to refactor since I can immediately see everywhere that the variable is used.