Re: bool: symbol name collision - Mailing list pgsql-bugs

From bryanh@giraffe-data.com (Bryan Henderson)
Subject Re: bool: symbol name collision
Date
Msg-id 55346.bryanh@giraffe-data.com
Whole thread Raw
In response to Re: bool: symbol name collision  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
>>> It's quite annoying and
>>> sad that they added "bool" to c99 since otherwise it would just be a
>>> drop-in replacement with extra functionality and very low risk of
>>> conflicts. Instead they virtually guaranteed conflicts with any large
>>> software over a single define.
>
>For that reason they put it into a separate header file stdbool.h that
>no one is required to include.

Yes, and they didn't really create any conflicts that didn't already exist.
No one thinking broadly enough would define "bool" because of the high chance
that somebody else did too, because it's such an obvious name.  The same is
true of names such as "int32".

For this reason, before C99, there were few software distributions that
defined "bool", with the chance of a distribution doing so inversely
proportional to how popular the distribution was.

Likewise, programmers who defined "bool" in their own private code were (and I
guess still are) largely the inexperienced ones -- who hadn't yet been bitten
by an interface header file that arrogantly claimed the name "bool."

--
Bryan Henderson                                   San Jose, California

pgsql-bugs by date:

Previous
From: bryanh@giraffe-data.com (Bryan Henderson)
Date:
Subject: Re: bool: symbol name collision
Next
From: Tom Lane
Date:
Subject: Re: "SET search_path" clause ignored during function creation