4 ms·
Do you mean, using anonymous structs for struct composition? you can do something similar with "-std=c11 -fms-extensions" The only thing it will be missing fro
by oscargrouch 14y ago
Do you mean, using anonymous structs for struct composition?
you can do something similar with "-std=c11 -fms-extensions"
The only thing it will be missing from plan9 c will be the automatic casting
from the composition to the base struct.. but its just to cast to the base struct when you need to reference only the parent struct, polymorphism.
(Ken Thompson called this effect as "Poor man classes")
Macros can be handy when you need to hide this nasty castings away when not using the plan9 extension..
the nice thing about "-std=c11 -fms-extensions" is that it works with gcc, clang and vc.