Multiple Dispatch ================= ```Example from 1 languages: Julia collide_with(x::Asteroid, y::Asteroid) = ... # deal with asteroid hitting asteroid collide_with(x::Asteroid, y::Spaceship) = ... # deal with asteroid hitting spaceship collide_with(x::Spaceship, y::Asteroid) = ... # deal with spaceship hitting asteroid collide_with(x::Spaceship, y::Spaceship) = ... # deal with spaceship hitting spaceship ``` ```Example from 1 languages: Common Lisp (defmethod collide-with ((x asteroid) (y asteroid)) ;; deal with asteroid hitting asteroid ) (defmethod collide-with ((x asteroid) (y spaceship)) ;; deal with asteroid hitting spaceship ) (defmethod collide-with ((x spaceship) (y asteroid)) ;; deal with spaceship hitting asteroid ) (defmethod collide-with ((x spaceship) (y spaceship)) ;; deal with spaceship hitting spaceship ) ``` * Languages *with* Multiple Dispatch include Julia, Smalltalk, Common Lisp, Dylan * Languages *without* Multiple Dispatch include JavaScript, Elixir, Speedie * View all concepts with or missing a *hasMultipleDispatch* measurement http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasMultipleDispatch&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22null%22%2C%22data%22%3A%22hasMultipleDispatch%22%2C%22origData%22%3A%22hasMultipleDispatch%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D missing http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasMultipleDispatch&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22!null%22%2C%22data%22%3A%22hasMultipleDispatch%22%2C%22origData%22%3A%22hasMultipleDispatch%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D with * Read more about Multiple Dispatch on the web: 1. https://en.wikipedia.org/wiki/Multiple_dispatch 1. Built with Scroll v178.2.3