[PATCH] Limit to 4 the number of cylinders shown in the data frame

Linus Torvalds torvalds at linux-foundation.org
Wed Dec 26 14:46:52 PST 2012


On Wed, Dec 26, 2012 at 1:17 PM, Salvador Cuñat
<salvador.cunat at gmail.com> wrote:
>
>  print.c |  350 ++++++++++++++++++++++++++++++++++++++++++++++----------------
>  1 files changed, 259 insertions(+), 91 deletions(-)

Ugh. It's not the "1 file", it's the "one single function" part I
absolutely detest.

To make it worse, you use that "nested function" abortion that should
never *ever* be used, and isn't real C, it's a badly thought out
abomination gcc that doesn't make any sense, and makes the code (and
code generation) nasty and unreadable. The people who came up with
that crap should be shot. They had damaged minds.

Please just split it up into *independent* functions. Yes, yes, I
realize that nested functions make bad programming easier (use the
variables from the parent function), but that is actually one of the
main reasons *not* to use them.

(Nesten functions make it hard to see the linkages, and the code
becomes unreadable. It's also non-standard and it really isn't one of
the *good* extensions.)

So, NAK on this patch. Nested functions are not acceptable. And one
single multi-hundred-line function isn't acceptable either. Split it
up properly.

               Linus


More information about the subsurface mailing list