Re: installdir patch for win32

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: installdir patch for win32
Дата
Msg-id 16693.1080262639@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: installdir patch for win32  (Claudio Natoli <claudio.natoli@memetrics.com>)
Ответы Re: installdir patch for win32  ("Andrew Dunstan" <andrew@dunslane.net>)
Re: installdir patch for win32  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список 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 по дате отправления:

Предыдущее
От: Claudio Natoli
Дата:
Сообщение: Re: APC/socket fix (final?)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: APC/socket fix (final?)