Hacker News new | past | comments | ask | show | jobs | submit login

Surely it should be `thing_t* thing`!



thing_t* thing_ptr, thing

imo, the star should be with the variable name. because, in this case, a reader could think that both thing_ptr and thing are pointer to a thing_t

"thing_t thing_ptr, thing, other_thing_ptr" is imo more readable


If one uses the entity* notation, they must always declare each variable with a separate declaration, that is:

  thing_t* ptr1;
  thing_t* ptr2;
not

  thing_t* ptr1, ptr2 /* <= oops */;




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: