From: "Peter I. Hansen" <pih@oek.dk>
Subject: Re: Natural data type ?
Date: Thu, 28 Mar 2002 17:47:20 +0100
Date: 2002-03-28T17:47:20+01:00 [thread overview]
Message-ID: <3CA34918.1020300@oek.dk> (raw)
In-Reply-To: a7u4as$ec8$1@msunews.cl.msu.edu
Chad R. Meiners wrote:
>I seriously doubt that someone made a random decision. There are many
>reasons to define N to include zero, for instance, the positive integers can
>easily represented as Z^+ while the negative integers may be represented as
>Z^-. There is a very nice symmetry with these representations of disjoint
>sets. It doesn't make sense to define the natural numbers to simply be the
>set of positive integer because you then have two competing names for the
>same set. Thus, it is better for the natural numbers (N) to be a different
>set from the positive integers (Z^+). Since zero isn't positive, this
>leaves N as the only candidate for containing zero.
>
>Very likely, whoever made this decision for Ada's data type of natural and
>positive had a similar rational reason for making this choice. I just don't
>see the designers flipping a coin or playing paper, scissors, rock to
>determine which data type gets zero ;) I wasn't around during Ada's initial
>design process; perhaps someone on comp.lang.ada was, and they know why or
>who made this decision or even if the decision was contested.
>
>-CRM
>
Thanks, this is a very good answer.
/Peter
next prev parent reply other threads:[~2002-03-28 16:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-27 2:13 Natural data type ? Peter I. Hansen
2002-03-27 2:57 ` Chad R. Meiners
2002-03-27 23:18 ` Peter I. Hansen
2002-03-28 3:55 ` Chad R. Meiners
2002-03-28 15:40 ` Marin David Condic
2002-03-28 16:47 ` Peter I. Hansen [this message]
2002-03-27 14:25 ` Marin David Condic
2002-03-28 16:45 ` Peter I. Hansen
2002-03-28 16:30 ` Georg Bauhaus
2002-03-28 16:42 ` Peter I. Hansen
2002-03-28 18:33 ` Darren New
2002-03-29 16:19 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox