DEV Community

Discussion on: Zero-overhead interface exploration in Nim language

shirleyquirk profile image
shirleyquirk • Edited on

Just seen this:
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.

Thread Thread
xflywind profile image
flywind Author


Thread Thread
shirleyquirk profile image

Oh man, they just keep coming:
This hidden gem is undocumented, but provides the same functionality without the overhead of a vtable.