3 ms·
I’m still regularly getting on projects and moving C89 variable declarations from the start of functions to where they’re initialized, but I guess it’s not the
by davemp 1y ago
I’m still regularly getting on projects and moving C89 variable declarations from the start of functions to where they’re initialized, but I guess it’s not the kids doing it.
- mkfs 1y ago> C89 variable declarations from the start of functions Technically it's the start of a block.
- davemp 1y agoTechnically but I don’t think folks ever really bothered.
- 1718627440 1y agoI only declare variables at the begin of a block, not because I would need C89 compatibility, but because I find it clearer to establish the working set of variables upfront. This doesn't restrict me in anyway, because I just start a new block, when I feel the need. I also try to keep the scope of a variable as small as possible.