4 ms·
This has been done before many times in many ways for many different purposes, some worse than others, as object systems for C (Xtk intrinsics widgets, GTK's GO
by DonHopkins 8y ago
This has been done before many times in many ways for many different purposes, some worse than others, as object systems for C (Xtk intrinsics widgets, GTK's GObjects), object systems written in C for other languages (ScriptX's "Objects in C", TCL/Tk widgets, Lua objects), cross-language object systems (Microsoft COM, IBM SOM, OpenDoc), distributed object proxy systems (CORBA, DCOM, DSOM), and object oriented C language dialects (Objective C, C++, Java).
Not that it's not worth doing again for fun or to explore different techniques and purposes. But the ones that are in use in the real world are incredibly clumsy and complex, require a lot of boilerplate and yak shaving, and you have to buy into a big toolchain and religion.
"The guy who invented the wheel was an idiot. The real genius was the guy who invented the other three." -Sid Caesar
- mpweiher 8y agoMarcel's corollary to Greenspun's tenth rule: any sufficiently large C/C++ contains an ad-hoc, informally-specified, bug-ridden, slow implementation of most of Objective-C. ¯\_(ツ)_/¯