[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Re: make check failing
From: |
Felix |
Subject: |
Re: [Chicken-hackers] [PATCH] Re: make check failing |
Date: |
Wed, 02 Jan 2013 13:31:46 +0100 (CET) |
>> It could. Should it? C just truncates. I dunno.
>
> I think it should. This will be an extra help in detecting bugs; if a
> user accidentally passes a flonum where a fixnum is expected that's
> always a bug, unless the flonum is the result of a fixnum overflow. And
> in the latter case, this should always be an integer value. To catch
> accidental misuse the additional check is useful.
The flonum/fixnum distinction is a distinction between types. But in
this case it is a property independent of type. Since we are passing
values to C anyway, I don't see a reason to add extra checks in this
case - the values pass the Scheme/C boundary and might as well
be treated using C semantics. I also don't see how this might prevent
bugs, and what type of bugs these would be.
>> I get cramps thinking of all the work that would have to go into such
>> a project.
>
> Yeah, me too. But it's good to hear you aren't against it per se.
> I might give this a try sometime. There are some improvements I want
> to make in the numbers egg first, which then should make integration
> into core simpler. I know the numbers egg improvements have been slow
> going, but it's a fine goal for the new year ;)
I *am* against it per se, but if the performance and complexity impact
is acceptable, then it would be reasonable to just ignore my whining.
cheers,
felix