News for hackers. Stuff that matters.
Re:C Programming Guidelines by jasonwatkinspdx on Tuesday September 01, 2015 @11:36PM (#10157291)
"Use struct thing thingptr[1]; to get pointers with inline storage ... You should pretty much always use -> instead of . ... I think this is the most important trick for making C code beautiful"

I don't really get what they're after with this section. Can anyone shed some light?

Re:C Programming Guidelines by andymurd on Tuesday September 01, 2015 @11:50PM (#10157327)
It is similar to:

    struct thing athing;
    struct thing *thingptr = &athing;
Then there should be no confusion as to whether you write:

    athing.member = 12;
or:

    thingptr->member = 12;
Re:C Programming Guidelines by fsloth on Wednesday September 02, 2015 @12:48AM (#10157487)
If I saw a declaration like that in a code I was reviewing I would politely ask not to use this pointless level of indirection. This adds a tiny bit of complexity to the code and gives nothing back.
Re:C Programming Guidelines by nitrogen on Wednesday September 02, 2015 @01:17AM (#10157555)
It can also turn a single memory access into two memory accesses if the structure and the pointer can't be coalesced by the optimizer.