Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2980)

Issue 5501081: Creates non-negative-integer? predicate. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by MikeSol
Modified:
12 years, 3 months ago
Reviewers:
Graham Percival, dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Creates non-negative-integer? predicate.

Patch Set 1 #

Patch Set 2 : Adds correct declaration to lily.scm #

Patch Set 3 : Various naming and negativity-checking things #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -4 lines) Patch
M lily/lily-guile.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M scm/c++.scm View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M scm/define-grob-properties.scm View 1 2 1 chunk +1 line, -1 line 0 comments Download
M scm/lily.scm View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 2
Graham Percival
I'm sorry to throw my hat in the ring so late, but I prefer something ...
12 years, 4 months ago (2011-12-30 19:15:57 UTC) #1
dak
12 years, 4 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.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b