R
Richard Heathfield
Malcolm McLean said:
As I understand it, the basis you advance for your claims is two-fold:
(a) the size_t name is ugly;
(b) the size_t type is unsigned.
I have already pointed out that I agree, pretty much, with (a), but that I
don't consider it to be a particularly persuasive or meritorious argument
for abandoning or deprecating size_t. It might make a reasonable argument
for suggesting a name change, although of course the chance of getting ISO
to agree on a name change is, in reality, zero.
The fact that size_t is unsigned fits naturally with its role (as
demonstrated by the cases in which the standard library uses it) as a way
for storing object sizes and object counts. A negative size for an object
is meaningless, as is a negative count of the number of objects (in the C
sense of the word). So I don't consider this argument to be particularly
persuasive or meritorious either, because the unsignedness of size_t is
perfectly natural and sensible, given the nature of its intended purpose.
It's an object count. It measures the distance, expressed in object units,
between the start of the array and the point in that array where can be
found the object that we care about. This is entirely consistent with the
usage of size_t in functions such as fread, fwrite, and calloc.
No. For example, I personally disagree with ISO's decision massively to
extend the standard library to include many types that are intended to
increase portability but whose successful use, as far as I understand it,
depends on the whims of implementors. Nevertheless, I would not say that
the arguments put forward for this change have no merit. I have seen
several defences of the decision, and it seemed to me that these arguments
did indeed have some merit. They did not persuade me, but they did at
least make me think hard about the issues, and that in itself is an
indication that they are not empty arguments.
In discussions in this newsgroup, I have disagreed with a great many
people, including Chris Torek, Steve Summit, Lawrence Kirby, Dan Pop, Dann
Corbit... names that will, I trust, be familiar to you. I think you will
agree that I have, on at the very least /some/ such occasions, managed to
disagree with them /without/ claiming that their arguments have no merit.
Therefore, your argument that "has no merit" is my way of saying "I
disagree" has no merit.
The claim has been made that there is "no basis" to my claims.
As I understand it, the basis you advance for your claims is two-fold:
(a) the size_t name is ugly;
(b) the size_t type is unsigned.
I have already pointed out that I agree, pretty much, with (a), but that I
don't consider it to be a particularly persuasive or meritorious argument
for abandoning or deprecating size_t. It might make a reasonable argument
for suggesting a name change, although of course the chance of getting ISO
to agree on a name change is, in reality, zero.
The fact that size_t is unsigned fits naturally with its role (as
demonstrated by the cases in which the standard library uses it) as a way
for storing object sizes and object counts. A negative size for an object
is meaningless, as is a negative count of the number of objects (in the C
sense of the word). So I don't consider this argument to be particularly
persuasive or meritorious either, because the unsignedness of size_t is
perfectly natural and sensible, given the nature of its intended purpose.
To write
size_t i;
for(i=0;i<N;i++)
{
ptr++;
}
is misleading, because it implies that i is a "size type" when it is
nothing of the sort. It is an index.
It's an object count. It measures the distance, expressed in object units,
between the start of the array and the point in that array where can be
found the object that we care about. This is entirely consistent with the
usage of size_t in functions such as fread, fwrite, and calloc.
Don't you think that is a justification that has some merit?
No.
Or maybe you
are making the stronger claim that, if you personally disagree with a
proposal, all arguments for it are not just weaker than the arguments
against (which you must believe), but have "no merit".
No. For example, I personally disagree with ISO's decision massively to
extend the standard library to include many types that are intended to
increase portability but whose successful use, as far as I understand it,
depends on the whims of implementors. Nevertheless, I would not say that
the arguments put forward for this change have no merit. I have seen
several defences of the decision, and it seemed to me that these arguments
did indeed have some merit. They did not persuade me, but they did at
least make me think hard about the issues, and that in itself is an
indication that they are not empty arguments.
I suspect this is
the case. "Has no merit" is Heathfieldese for "I disagree".
In discussions in this newsgroup, I have disagreed with a great many
people, including Chris Torek, Steve Summit, Lawrence Kirby, Dan Pop, Dann
Corbit... names that will, I trust, be familiar to you. I think you will
agree that I have, on at the very least /some/ such occasions, managed to
disagree with them /without/ claiming that their arguments have no merit.
Therefore, your argument that "has no merit" is my way of saying "I
disagree" has no merit.