svn 14567

Rob Landley rob at landley.net
Mon Mar 20 19:53:33 UTC 2006


On Monday 20 March 2006 2:40 pm, Tito wrote:
> On Monday 20 March 2006 18:20, Rob Landley wrote:
> > On Monday 20 March 2006 12:06 pm, Aurelien Jacobs wrote:
> > > On Mon, 20 Mar 2006 11:07:08 -0500
> > >
> > > Rob Landley <rob at landley.net> wrote:
> > > > On Monday 20 March 2006 2:30 am, Tito wrote:
> > > > > On Monday 20 March 2006 00:32, Rob Landley wrote:
> > > > > > Adding a comment is nice, but how is #defining a constant just to
> > > > > > use it on the next an improvement?
> > > > >
> > > > > So we know where the magic numbers came from and what they are
> > > > > supposed to do...?!
> > > > >
> > > > > ;-P
> > > >
> > > > Why wouldn't that fall under the "adding a comment is nice" part?
> > >
> > > Maybe because that already fall under the "self-documenting code is
> > > great" part ;-)
> >
> > If that was true, why would you need the comment?
>
> To see where this constants came from so that you don't need to grep
> all the kernel source to find them.

So if you need the comment, it's not self-documenting code.  So why not just 
have a comment instead of a #define where you #define something just so you 
can immediately use it exactly once?

That's the point I was trying to make.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list