[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scm_integer_p and scm_num2int mismatch
From: |
Dirk Herrmann |
Subject: |
Re: scm_integer_p and scm_num2int mismatch |
Date: |
Mon, 8 Oct 2001 21:30:08 +0200 (MEST) |
On 7 Oct 2001, Jan Nieuwenhuizen wrote:
> The behaviour of scm_num2int has changed, it now only wants an integer
> value as input, but the behaviour of scm_integer_p has not changed, so
> this no longer can serve as a test for valdid scm_num2int values.
We've had a discussion about the issue some days ago. I don't claim that
there has been a definitive solution about it, but to me it seems that
sort of a consensus was:
* scm_num2int and friends are going to be deprecated. The reason is that
the names are irritating: They suggest that any number should be OK as
an input parameter, although handling non-integer values requires some
transformations. It was decided against performing such transformations
implicitly. (Not sure about this one: The old behaviour of
scm_num2int is going to be restored during the deprecation phase.)
* instead, functions like scm_integer2int and scm_exact_integer2int will
be provided. The first one would also accept inexact integers and
implicitly coerce them to exact ones.
Best regards
Dirk Herrmann