On Sun, 26 Jun 2011 12:21:24 +0200 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
Hi,
we have quite a few pending patches which just move code around to avoid forward declarations. The sad thing is that some of those pieces of code were already moved around in the past to avoid forward declarations. Tracking code history becomes unnecessarily hard with all those moves, and I expect lots of code to be moved again and again as flashrom evolves.
Yes, forward declarations are ugly, but not moving code around makes patches smaller and reviews easier. We don't have enough reviewer capacity, and while I argued against forward declarations in the past, I have to admit they are a good way to keep code changes as small as possible. New code should preferably be inserted where it does not need forward declarations, but moving old code around inside the same file is not a good thing IMHO.
(And yes, I have a few patches in my local queue which move lots of code around, so I'd have to redo them as well, but hopefully the result can be reviewed more easily.)
Thoughts?
i was astonished when i realized flashrom's policy of moving code instead just adding declarations. i adapted to it, but i don't see the advantage of it at all if you have to move code around and pollute history. also declarations provide a good point to get an overview of the source and add docs imho.