On Saturday, 13 June 2020 at 18:39:14 UTC, Paul Backus wrote:
On Saturday, 13 June 2020 at 15:11:49 UTC, Atila Neves wrote:
https://code.dlang.org/packages/tardy
https://github.com/atilaneves/tardy
Cool stuff!
What's the reasoning behind implementing your own vtables
instead of using D's built-in object system? Don't want to be
stuck inheriting from Object?
That's one reason, but even more importantly this gives the
implementation more freedom and potentially more options for
client code. I haven't added it yet (mostly due to laziness) but
I considered compile-time policies to inline the vtable in the
object, or to determine ordering of the vtable and the
implementation (might have performance considerations), and a few
other things.
Also: more fun to implement, and shows that it can be done as a
library.