4 ms·
Uh, this isn't dynamic dispatch (aka associating a function callsite to its implementation at runtime): https://en.m.wikipedia.org/wiki/Dynamic_dispatch https:
by zzalpha 9y ago
Uh, this isn't dynamic dispatch (aka associating a function callsite to its implementation at runtime):
https://en.m.wikipedia.org/wiki/Dynamic_dispatch https://en.m.wikipedia.org/wiki/Dynamic_dispatch
It's just pattern matching and lamdbas. In another language you'd probably do the same thing with a map containing commands as keys and lambdas as values.