Hacker News new | ask | show | jobs
by adgar 5394 days ago
> dynamic dispatch (thin of doesNotUnderstand, method_missing and __getattr__)

Dynamic Dispatch has a very well-defined meaning. It means dispatching based on the runtime type of a variable rather than the declared, static type. The three methods you mention just happen to exist in languages that feature only dynamic dispatch.

I'm not sure if there's a formal term for the methods you refer to, but they aren't "dynamic dispatch".

1 comments

Actually there is. This is a reification of the call stack (so it is a reflection trait of the language) called method lookup alteration and interception[1]

But thanks for pointing it out. I've edited the original comment to avoid confusion.

[1] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.91....