chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] use inline safe block-accessors


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] use inline safe block-accessors
Date: Fri, 12 Oct 2012 20:40:45 +0200
User-agent: Mutt/1.4.2.3i

On Tue, Oct 09, 2012 at 05:07:48AM -0400, Felix wrote:
> The attached patch provides a more efficient implementation of low-level
> block accessors ("##sys#block-ref"/"##sys#block-set!", usually needed 
> for record-structures, and "matchable". These primitives are safe (in
> contrast to "##sys#slot"/"##sys#setslot"), in that they handle invalid
> slot-indices. The new C-level equivalents "C_i_fast_block_ref" and
> "C_i_fast_block_set" are defined in chicken.h as inline functions.

Unless I'm mistaken, this changes the semantics of block-ref by returning
(void) rather than raising an error.  That doesn't seem particularly safe
to me, and may lead to deferred errors which will be harder to debug.
Why does this behavior need to be changed?

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

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