develooper Front page | perl.perl5.porters | Postings from June 2016

Re: Inconsistencies in memory size types

Thread Previous | Thread Next
Father Chrysostomos
June 22, 2016 01:01
Re: Inconsistencies in memory size types
Message ID:
I wrote:
> Sawyer X wrote:
> > On 06/17/2016 05:28 PM, Father Chrysostomos wrote:
> > > Dave Mitchell:
> > >> My current preference is that core standardises on Size_t and SSize_t,
> > >> and eliminates usage of size_t, ssize_t, STRLEN and MEM_SIZE.
> > > I have always liked STRLEN and MEM_SIZE, because the make the code more
> > > self-documenting.
> > >
> > > There!  You never have consensus on anything.
> >
> > I think the question is: Would you object to standardizing on Size_t and
> > SSize_t, despite preferring to use STRLEN and MEM_SIZE?
> I suppose not.  I am just used to seeing the code written a cer-
> tain way. :-)

Actually, I take back what I said.  While STRLEN documents the
*intent* more clearly, Size_t documents the signedness more clearly,
and that is probably more important. It makes it easier to see what
the assumption are, rather than what the values are used for.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About