ccv icon indicating copy to clipboard operation
ccv copied to clipboard

Design choices : anonymous structs

Open FlorianDenis opened this issue 11 years ago • 1 comments

Hey,

I was wondering if you could expand on the decision of using anonymous structs in ccv such as

typedef struct {
    int type;
    uint64_t sig;
    ...
} ccv_dense_matrix_t;

This prevents forward-declaring of ccv_dense_matrix_t and I can't seem to figure out where you could benefit from such a design choice.

I would actually benefit from such changes, would you accept a pull request naming these structs if I were to make one ?

FlorianDenis avatar Nov 11 '13 22:11 FlorianDenis

hey, I would like to take the extern struct decl, however, I would like to take it in the form of

typedef struct ccv_dense_matrix { } ccv_dense_matrix_t;

what do you think? The reason is that claiming

struct ccv_dense_matrix_t* mat;

with the extra _t to denote it is a struct seems to me like a repetition.

liuliu avatar Apr 28 '14 00:04 liuliu