[m-rev.] posix patch (stat, pipe, kill)

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jul 25 14:19:05 AEST 2001


On 25-Jul-2001, Michael Day <mikeday at bigpond.net.au> wrote:
> 
> >   I think you should stick with the Posix names: dev_t, ino_t, uid_t,
> >   etc.
> 
> I think that the _t convention used in C is not necessary here. When
> people talk about these functions they talk in terms of pids and uids; The
> suffix is just to satisfy the demands of the particular language.

Well, that's mostly true, but nevertheless the Posix standard does use those
names, and there are drawbacks to using different names than what the Posix
standard uses, even if the difference is just the absence of the "_t" suffix.

> >   This is consistent with the approach taken in library/time.m.
> 
> I think that time_t should definitely not appear in the standard library
> (at least not in any future versions of the standard library) as it
> assumes that the standard library is written in C,

No, not at all.  It just indicates to the reader that this type has the same
meaning as the C and Posix type time_t.

> Why not just use "time"?

Then readers who are familiar with the C and Posix time_t type
would not know that it is intended to have the same meaning as
the C and Posix time_t type.

> Also, the existing posix modules use "mode" rather than mode_t.

I think that should be changed.
(With `:- type mode == mode_t. % XXX This is deprecated; please use mode_t.'
for backwards compatibility.)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list