There are times when the second form won't work. Say you want to create a linked list of Monster
s. With the first form, you can add a pointer to the next Monster
in the struct
.
struct Monster {
Object proto;
int hit_points;
struct Monster* next;
};
You can't do that in the second form since the struct
doesn't have a name.