Claudio Natoli <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to