Re: transformExpr() refactor - Mailing list pgsql-patches

From Neil Conway
Subject Re: transformExpr() refactor
Date
Msg-id 1099011628.21058.15.camel@localhost.localdomain
Whole thread Raw
In response to Re: transformExpr() refactor  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: transformExpr() refactor
List pgsql-patches
On Fri, 2004-10-29 at 00:17, Tom Lane wrote:
> I don't actually find this to be an improvement.  What's the point?
> Since all the switch arms are independent, you haven't really done
> anything at all to improve the comprehensibility of the code...

I think the code is more readable this way. The very fact that the
switch branches are completely independent is good enough reason to make
them distinct functions, IMHO. Breaking 900 lines of code into smaller
chunks of code, each of which does a single conceptual task, just makes
the whole enterprise easier to understand. As for sharing code between
the functions, I agree that isn't done today -- but it will be easier to
do in the future with this refactoring.

-Neil



pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: rmtree cleanup
Next
From: Robert Treat
Date:
Subject: FAQ update