I'm sorry to throw my hat in the ring so late, but I prefer something ...
13 years, 3 months ago
(2011-12-30 19:15:57 UTC)
#1
I'm sorry to throw my hat in the ring so late, but I prefer something explicit
like non-negative-integer?
I mean, the name tells it all. What is this function doing? It's checking
whether something is a non-negative integer. If it's called count? then
somebody might need to look up the docstring to see what it's doing. It's great
to have accurate documentation, but IMO it's better if the language naming
doesn't require any documentation at all.
Mathematically, we could call it Z+*? but that doesn't really fit into scheme
names. According to wolfram alpha, the english name for Z+* is "nonnegative
integers".
On 2011/12/30 19:15:57, Graham Percival wrote: > I'm sorry to throw my hat in the ...
13 years, 3 months ago
(2011-12-30 19:38:14 UTC)
#2
On 2011/12/30 19:15:57, Graham Percival wrote:
> I'm sorry to throw my hat in the ring so late, but I prefer something explicit
> like non-negative-integer?
>
> I mean, the name tells it all. What is this function doing? It's checking
> whether something is a non-negative integer. If it's called count? then
> somebody might need to look up the docstring to see what it's doing. It's
great
> to have accurate documentation, but IMO it's better if the language naming
> doesn't require any documentation at all.
>
> Mathematically, we could call it Z+*? but that doesn't really fit into scheme
> names. According to wolfram alpha, the english name for Z+* is "nonnegative
> integers".
The point is that the respective properties are used as counts or indexes. The
axioms that you care for here are the Peano axioms. "non-negative integers"
starts with the set defined by the _integer_ axioms, then takes a subset. That
this subset is isomorphic to the naturals is an amazing thing, but it is an
indirect relation.
Talking about "non-negative integers" when we are talking about contexts where
the ring of integers does not make any particular sense, and negative integers
are completely absurd, is distracting.
It is like talking about preserving non-human primates in the rain forest when
you mean apes.
It does not make sense to demand a degree in mathematics for being allowed to
make sense of programs.
Issue 5501081: Creates non-negative-integer? predicate.
(Closed)
Created 13 years, 3 months ago by MikeSol
Modified 13 years, 2 months ago
Reviewers: Graham Percival, dak
Base URL:
Comments: 0