Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Julia's multiple dispatch explained with Pokemons. Parent comment
EDIT: to make it even more obvious there's no difference:
class Fire{} class Water {} class Grass {} class Ice {} def eff(Fire f, Grass g) { 'burn' } def eff(Fire f, Ice ice) { 'melt' } def eff(Water w, Grass g) { 'grow' } def eff(Water w, Ice ice) { 'freeze' } def eff(a, b) { 'undefined' } // hide compile-time types Object fire = new Fire() Object grass = new Grass() Object ice = new Ice() Object water = new Water() println eff(fire, grass) println eff(fire, ice) println eff(water, grass) println eff(water, ice) println eff(ice, water)
burn melt grow freeze undefined
There are no comments on this comment yet.
EDIT: to make it even more obvious there's no difference:
Prints: