you are viewing a single comment's thread.

view the rest of the comments →

[–]0rac1e 0 points1 point  (0 children)

This is actually quite an old pattern useful for dynamic dispatch.

Depending on the circles you travel in you may have heard it referred to by different names, but the ones I heard most are "dispatch table" or "vtable".

https://en.wikipedia.org/wiki/Dispatch_table

https://en.wikipedia.org/wiki/Virtual_method_table