logoalt Hacker News

messetoday at 7:32 AM2 repliesview on HN

> even Zig has methods and interfaces

Zig doesn't have interfaces as a language level feature. It uses manually implemented vtables and wrapper methods.

You can do the same in Odin with wrapper functions around a vtable.


Replies

leecommamichaeltoday at 7:39 AM

There's even syntax-sugar for it in Odin with the `->` operator.

show 2 replies
gethlytoday at 11:17 AM

I have not looked much into it. Someone mentioned it once, so i just remembered it.