jackiesshirt | 1 year ago | on: C Style: My favorite C programming practices (2014) >Prefer compound literals to superfluous variablesI used to agree with this but I have moved away from compound literals entirely except for global statics/const definitions.Having a variable and explicit: foo.x = whatever; foo.y = something_else; Leads to better debug experience imo, can set breakpoints and single step each assignment and have a name to put a watch on.
I used to agree with this but I have moved away from compound literals entirely except for global statics/const definitions.
Having a variable and explicit:
Leads to better debug experience imo, can set breakpoints and single step each assignment and have a name to put a watch on.