ertugrulcetin / jme-clj

A Clojure 3D Game Engine (Wrapper), Powered by jMonkeyEngine
MIT License
142 stars 9 forks source link

Should `collide-with` be deprecated in favour of `collide-with!` #15

Open simon-brooke opened 3 months ago

simon-brooke commented 3 months ago

The function collide-with modifies its third argument, an instance of CollisionResults, by potentially adding a new CollisionResult object. It's conventional in Clojure to mark functions which are not pure functions with an exclamation mark suffix.

I propose:

  1. create a new function collide-with! with the same code as the existing collide-with;
  2. alter collide-with to call collide-with!;
  3. deprecate collide-with in favour of collide-with!.

Let me know whether a pull request to this effect would be acceptable.