guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: size_t & unsigned long


From: Dirk Herrmann
Subject: Re: size_t & unsigned long
Date: Fri, 11 May 2001 17:14:46 +0200 (MEST)

On 11 May 2001, Michael Livshin wrote:
> 
> the current Guile code assumes that the two types `size_t' and
> `unsigned long' are interchangeable.
> 
> since I don't, by any stretch, have the ANSI C standard handy, I have
> a couple of questions:
> 
> 1) is the above assumption ANSI-compliant?
> 
> 2) if it is not, do we care?

I'd say, yes.  IMO, we should at least _try_ to be type safe, and also
use the most restrictive possible types, like prefering unsigned types for
values that can't be negative.

Another point:  We have a type scm_sizet (which, IMO, should better be
renamed to scm_size_t whenver we fell masochist enough for such a change),
the purpose of which does not seem to be too clearly defined.  In which
situations should we use this type?  What is the difference to size_t?

Best regards,
Dirk Herrmann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]