News for hackers. Stuff that matters.
Re:The use of `class` for things that should be simple free ... by edflsafoiewq on Thursday May 28, 2020 @04:47AM (#23334977)
> This means that at the time you select which method to call, you must also have at your disposal the instance on which you want to call it!

That is also its advantage, since the method to call can depend on the instance. Not just for dynamic dispatch either. A statically dispatched call will look up B on classof(A).

There are no comments on this comment yet.