[Top][All Lists]

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

pure simple-closures

From: Joe Neeman
Subject: pure simple-closures
Date: Fri, 20 Oct 2006 21:30:04 +0200

Here is an attempt at making simple-closures pure-evaluatable. A

1) move the conversion of non-pure-to-pure callbacks into C++ where it
is a bit easier to access and generalise it to support functions other
than just grob callbacks. The convention is that if a non-pure function
takes (arg1 arg2 arg3) as arguments then the pure version will take
(arg1 start end arg2 arg3) as arguments. This order is so that we can
have arg3, for example, as an optional argument.

2) adopt the convention that if any argument in a simple-closure is
UNDEFINED, the entire closure is UNDEFINED. This allows us to abort the
evaluation of a pure closure when there is an unpure function with no
pure equivalent. This requires changing the SCM_UNDEFINED in to scm_from_int(0).

I haven't actually written any new pure functions yet, so the impact is
fairly small. I'll try to do a pure_avoid_slur_callback before 2.10. I
should point out, though, that the main problem in issue #113 has been
mitigated somewhat by the fact that TextScripts usually use normal
procedures now for Y-offset.

Attachment: tmp.patch
Description: Text Data

reply via email to

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