Sujet : Re: encapsulating directory operations
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 11. Jun 2025, 16:32:06
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250611082414.203@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-06-10, Keith Thompson <Keith.S.Thompson+
u@gmail.com> wrote:
I find the reservation of potential errno macro names annoying.
Perhaps more annoying is the idea that all _t typedef names are reserved
by POSIX.
But, you have to look at it from a different point of view. POSIX
essentially says that when it introduces types names, they will stick a
_t suffix on them. I.e. that they will conform with a common practice.
This is good! We want that!
That doesn't mean everyone should panic and abandon the same good
practice.
Suppose two computer philosophers live on separate islands and are
thinking of what to name a type. One comes up with "foo" and the
other with "bar". If they meet and integrate their code, there will
not be a clash.
Now suppose that they are conscious of conventions; because they
are naming a type, they both add "_t".
That, ipso facto, is not going to *introduce* a clash!
Everyone adding a common suffix to a class of identifiers will
not introduce clashes in that class. Likewise, removing a common suffix
will not introduce a clash.
Now sure, if organization A uses _t, and B entirely avoids it, their
type names cannot clash; velvet_underground and velvet_underground_t
are distinct. But that's a bad reading of the situation.
I want types in C programs to have _t whether they are coming
from POSIX, third party vendors, or the local code base.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca