Just seen this: nimble.directory/pkg/interfaced
I think it provides the semantics you are looking for, really cleanly.
Works by creating a vtable under the hood, just like other oo languages do.
Pretty crazy that Nims macro system makes it possible to add such a feature to the language.
Just seen this:
nimble.directory/pkg/interfaced
I think it provides the semantics you are looking for, really cleanly.
Works by creating a vtable under the hood, just like other oo languages do.
Pretty crazy that Nims macro system makes it possible to add such a feature to the language.
Thanks!
Oh man, they just keep coming:
This hidden gem is undocumented, but provides the same functionality without the overhead of a vtable.
github.com/mratsim/trace-of-radian...