3 ms·
Might as well just use Go.
by meaty 14y ago
Might as well just use Go.
- oscargrouch 14y agoYou can use go where you use python, ruby and maybe some of the things that get done on c++. But not being C friendly , and with a GC.. for the things people still use C and C++ these days.. probably even if you want to use Go, you wont be able to.. If the guys from plan9 just get the Ken Thompson C compiler from plan9 and changed that C just a little bit, taking care that a plain C header could be added to that code the same way we could do with C++ only then, it would be possible to "just use Go" (plan9 C can be used with gcc using "fplan9-extensions")
- rbanffy 14y agoLoved the direct struct assignment. Is it plan9 only?
- oscargrouch 14y agoDo 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.