[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: const char* typedefs
- From: Sean Conner <sean@...>
- Date: Tue, 6 Feb 2018 15:07:23 -0500
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