3 ms·
The Lisp code used multiple dispatch to handle collisions between objects, whereas your Clojure code instead uses list comprehensions to generate pairs of colli
by fusiongyro 14y ago
The Lisp code used multiple dispatch to handle collisions between objects, whereas your Clojure code instead uses list comprehensions to generate pairs of colliding objects by type. I know Clojure also supports multiple dispatch, so I'm wondering if you could comment on this design decision.
- prospero 14y agoThe only collisions I care about in my implementation are asteroid/ship and bullet/asteroid, and they're easier to express directly. The OP's version appears to have many more types of collisions, which makes multiple dispatch a more obvious choice.