Name: Anonymous 2010-07-19 22:24
What does /prog/ like better?
I personally like string
I personally like string
do_stuff(some_object, 1, 2, 3) significantly different than some_object.do_stuff(1, 2, 3)? You might as well use C and accomplish all the same things with less work.
typedef struct parent {
int a, b, c; /* some stuff */
} parent;
typedef struct child {
parent p;
int d, e;
} child;
/* ... */
#define PARENT(obj) ((parent *) (obj))
#define parent_do_stuff(obj, a, b, c) _parent_do_stuff(PARENT(obj), a, b, c)child *c = new_child();
parent_do_stuff(c, 1, 2, 3);int rtti in your parent object and contrive some sort of isa() to verify that the pointed object is of the appropriate type.