On Wed, Jul 26, 2017 at 05:41:59AM +0000, Edward Kenworthy wrote:
> Three reasons I can think of for why not:
> 1. The intent is much less clear with your version.
> 2. It doesn’t support multiple objects at a location.
> 3. It’s less performant, because it has to unnecessarily perform (let ((objs (mapcar #'car obj-locs))) on every call.
> 4. It doesn’t support objects that aren’t at a location.
> Or to reverse that: *objects* would be an optimisation of your code improving performance, which supports multiple objects at a location and makes the intent clearer.
I knew I was missing something...
If I had actually used the new code and played the game, 2 and 4 would
have caused issues and I would have been pushed back to the original.
I was aware of 3, but decided that I didn't care. For 1, I was thinking,
at least at the time I did this, that the new structure was more clear,
but now I am onboard with the original structure.
John de la Garza