This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Mikael Djurfeldt <mdj@nada.kth.se> writes: > mikel@opal.co.il (Michael N. Livshin) writes: > > > Structs seem to be a low level type-definition mechanism > > which has decided in mid-way to become an object system. > > With a MOP. > > How did you arrive at this? Um. Tried to be funny, I guess. I wasn't exactly feeling physically well yesterday... Whatever, I just tried to picture my impression of the structs' interface. > > Records. > > I think, this is (potentially) the best of the three. To make > > it so, records need to be implemented in the Guile core, and > > the C interface to them needs to allow user GC hooks and binary > > data. Another win of this would be a unified type-definition > > mechanism for both C and Scheme levels. > > Yes. This is what I referred to as a "functionally similar" > replacement for the structs in a recent letter. I'm going to take a stab at this today or tomorrow (borrowing the implementation from SCM, probably). Where this will differ from SCM's implementation is that a C programmer will be able to reserve an arbitrary number of words at the beginning of the record's data array and do what he pleases with them. Plus specifying GC hooks, of course. The `make-record-type' which is exported to Scheme will reserve 0 words. Is this OK? > /mdj mike.