Похожие чаты

But what else do you think would be a perfect

replacement for oop?

3 ответов

19 просмотров

Tagged unions with forwarding methods

JOHNNY- Автор вопроса
Thomas
Tagged unions with forwarding methods

Alright I have no idea what that is

JOHNNY
Alright I have no idea what that is

struct MyInterface { MyInterfaceTag tag; union { ...variants }; }; MyInterface_doThing(union MyInterface x) { switch (x.tag) { case MyInterfaceId_Foo: return Foo_doThing(x.foo); ...variants } }

Похожие вопросы

Карта сайта