Article: Writing Julia style multiple dispatch code in D
Jean-Louis Leroy via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Aug 31 07:11:45 PDT 2017
On Thursday, 31 August 2017 at 06:58:53 UTC, Petar Kirov
[ZombineDev] wrote:
> The workaround is to cast to Object before getting the typeid.
> The cause for this behavior is that if you have an interface
> reference to an object it points to the interface vtbl and not
> to the Object base class vtbl.
Yeah I know. And in my openmethods lib I simply follow the
pointers, without relying on typeid. It does look to me like a
bug though. D has all the info it needs to implement the process
you describe.
More information about the Digitalmars-d-announce
mailing list