bug#24102: Use guile variable objects as SRFI-111 boxes.

2017-03-01 Thread Andy Wingo
On Wed 31 Aug 2016 11:03, Andy Wingo writes: > On Thu 18 Aug 2016 18:14, Mark H Weaver writes: > >> As I wrote above, the current guile compiler can already do this kind of >> type inference, although it does not currently do this for boxes. >> we can already anticipate having native code genera

bug#24102: Use guile variable objects as SRFI-111 boxes.

2016-08-31 Thread Andy Wingo
On Thu 18 Aug 2016 18:14, Mark H Weaver writes: > As I wrote above, the current guile compiler can already do this kind of > type inference, although it does not currently do this for boxes. > we can already anticipate having native code generation in the > next couple of years, and we must keep

bug#24102: Use guile variable objects as SRFI-111 boxes.

2016-08-18 Thread Mark H Weaver
"Glenn Michaels" writes: > Sorry for the delayed response. > > Mark H Weaver writes: >> > Moreover, SRFI-111 boxes and guile variable objects are clearly >> > semantically the same thing. > >> Unfortunately, they are not quite the same thing. Unlike SRFI-111 >> boxes, Guile variables are a unio

bug#24102: Use guile variable objects as SRFI-111 boxes.

2016-08-18 Thread Glenn Michaels
Sorry for the delayed response. Mark H Weaver writes: > > Moreover, SRFI-111 boxes and guile variable objects are clearly > > semantically the same thing. > Unfortunately, they are not quite the same thing. Unlike SRFI-111 > boxes, Guile variables are a union type: they contain an arbitrary > S

bug#24102: Use guile variable objects as SRFI-111 boxes.

2016-08-04 Thread Mark H Weaver
Mark H Weaver writes: > As a result, some important properties of SRFI-111 boxes do not hold for > your proposed implementation. For example, in SRFI-111, (box? x) > implies that (box-ref x) will not raise an exception, and this fact can > be exploited by a compiler to produce better native code

bug#24102: Use guile variable objects as SRFI-111 boxes.

2016-08-04 Thread Mark H Weaver
Hi Glenn, "Glenn Michaels" writes: > Currently, guile's (srfi srfi-111) module ("mutable boxes") provides > an implementation based on records with a single value field. > > Wouldn't it make more sense to re-export the functions make-variable, > variable?, variable-ref and variable-set! from the

bug#24102: Use guile variable objects as SRFI-111 boxes.

2016-08-04 Thread Andy Wingo
On Tue 02 Aug 2016 12:25, "Glenn Michaels" writes: > Trivial patch implementing this suggestion attached. > > --- a/module/srfi/srfi-111.scm > +++ b/module/srfi/srfi-111.scm > @@ -17,21 +17,9 @@ > ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > > (define-m

bug#24102: Use guile variable objects as SRFI-111 boxes.

2016-08-02 Thread Glenn Michaels
Trivial patch implementing this suggestion attached. --- a/module/srfi/srfi-111.scm +++ b/module/srfi/srfi-111.scm @@ -17,21 +17,9 @@ ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (define-module (srfi srfi-111) - #:use-module (srfi srfi-9) - #:use-module (srf

bug#24102: Use guile variable objects as SRFI-111 boxes.

2016-07-29 Thread Glenn Michaels
Currently, guile's (srfi srfi-111) module ("mutable boxes") provides an implementation based on records with a single value field. Wouldn't it make more sense to re-export the functions make-variable, variable?, variable-ref and variable-set! from the guile core as box, box?, unbox and set-box! re