On Wednesday, 7 March 2018 at 12:49:40 UTC, Guillaume Piolat wrote:
If you know enough D maybe you can implement your own virtual functions on top of D structs. It seems no one has made it yet.

When I wrote Xanthe a year ago, I rolled my own classes using alias this and explicit vtables:
https://gitlab.com/sarneaud/xanthe/blob/master/src/game/rigid_body.d#L15
(I did this because normal D classes use the druntime library, and Xanthe was an experiment in not using the D runtime at all.)

Henrik: you might be interested in this post I wrote about making that:
https://theartofmachinery.com/2017/02/28/bare_metal_d.html
NB: things are moving fast and some things have already improved since then.

Reply via email to