Re: installdir patch for win32 - Mailing list pgsql-patches

From Tom Lane
Subject Re: installdir patch for win32
Date
Msg-id 16693.1080262639@sss.pgh.pa.us
Whole thread Raw
In response to Re: installdir patch for win32  (Claudio Natoli <claudio.natoli@memetrics.com>)
Responses Re: installdir patch for win32
Re: installdir patch for win32
List pgsql-patches
Claudio Natoli <claudio.natoli@memetrics.com> writes:
> Tom Lane wrote:
>> Every "#ifdef WIN32" I see reduces my opinion of the quality of work
>> being done for this port.

> At risk of getting (further? :-) on your bad side, IMHO that is a specious
> metric.

Well, it's surely not the only interesting metric, but I don't think
it's specious.  Every #ifdef poses a continuing load on future
maintainers, who have to look at that code and think whether they need
to worry about adjusting it when making nearby changes.  To the extent
that you can avoid ifdefs in favor of cleaner solutions (such as
refactoring code, or solving a general problem instead of making a
platform-specific change in behavior), you'll have more readable and
more maintainable code.

I'm not expecting to see zero ifdefs --- certainly not in the port
modules ;-).  But Bruce's search, further up in the thread, showed that
#ifdef WIN32's are sneaking into a lot of modules that probably
shouldn't have any platform dependencies.  I don't think that's a good
sign.  We should be working to keep those dependencies localized.

            regards, tom lane

pgsql-patches by date:

Previous
From: Claudio Natoli
Date:
Subject: Re: APC/socket fix (final?)
Next
From: Tom Lane
Date:
Subject: Re: APC/socket fix (final?)