lilypond-devel
[Top][All Lists]
Advanced

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

Re: Creates non-negative-integer? predicate. (issue 5501081)


From: dak
Subject: Re: Creates non-negative-integer? predicate. (issue 5501081)
Date: Fri, 30 Dec 2011 19:38:14 +0000

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.

http://codereview.appspot.com/5501081/



reply via email to

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