[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stack overflow equal? values
From: |
Ludovic Courtès |
Subject: |
Re: stack overflow equal? values |
Date: |
Fri, 19 Jan 2007 10:19:45 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hi,
Kevin Ryde <address@hidden> writes:
> Yep, looks good.
Applied to both branches (I also converted the change logs in 1.8 to
UTF-8 :-)).
> After I posted I wondered if the values struct is an actual "s" or if
> there's some strange extra I couldn't spot. Testing eq avoids
> worrying about that.
Yes. The `s' field is actually part of the REQUIRED_VTABLE_FIELDS that
gets automatically added in `make-vtable-vtable'.
> Dunno why values are a struct and not a smob cell.
Maybe because structs looked cool at that time. ;-)
>> but their semantics are a
>> little fuzzy to me. In particular, I don't understand why the size of
>> the tail array can be specified in both `make-vtable-vtable' and
>> `make-struct': What does that mean? Which one should really be taken
>> into account?
>
> Dunno :).
Then maybe we should "do something" about it in 1.9, and fix remaining
bugs.
> The records level is friendlier I guess. For a long time I couldn't
> understand what "vtable" meant, I still don't think I quite do. Maybe
> the docs should be tweaked, to help show what structs are typically
> meant to be.
Yes. Actually, I used mostly exclusively either SRFI-9 records or GOOPS
classes. Then there's also Guile's built-in records as you said.
Structs are nice in that they can be easily accessed both from C and
Scheme, so they can probably be used in lieu of SMOBs in some cases.
Still, that leaves us with 3 (or 4) record/struct APIs, and we may also
want to implement R6RS records at some point...
Thanks,
Ludovic.