lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Paige DePol once stated:
> Sean Conner <sean@conman.org> wrote:
> 
> > Or each parameter on its own line:
> > 
> > int dump_memorys(
> >        char       *dest,
> >        size_t      dsize,
> >        void const *data,
> >        size_t      size,
> >        size_t      amount,
> >        size_t      offset
> > )
> 
> I think that style would take a lot of getting used to, though I guess
> I can see how for functions with a lot of params it is easier to read!

  While the above is from code I wrote [1] I had to spend some time looking
for an example of the above.  I try to write function with as few parameters
as possible, partly because of the "creeping width" issue, but it's also a
"code smell".

  -spc

[1]	https://github.com/spc476/CGILib/blob/master/src/Dump/dump_memorys.c