Re: propositions, oppositions, and some minor details
Alex Shinn 08 Nov 2004 02:41 UTC
At Sun, 7 Nov 2004 18:48:13 -0800 (PST), xxxxxx@autodrip.bloodandcoffee.net wrote:
>
> On Tue, 28 Sep 2004, Alex Shinn wrote:
>
> > However, realistically most implementations either use a relative of
> > TinyCLOS (for which slot-setting is customizable with the MOP and for
> > immutable fields and left unchanged for mutable fields at no extra
> > cost) or Meroon (which already supports immutable fields), so this
> > isn't really an issue.
>
> This is a little late to add to the discussion, but I just want to
> contest the claim that most serious Scheme systems that provide first-
> class record type descriptors base/implement their record systems atop
> CLOS-style frameworks such as Tiny-CLOS or Meroon. I can think of only
> three implementations that do such a thing -- Gauche, RScheme, & STklos
> --, whereas I can think of a very large number of others that either
> don't support such frameworks at all or, if they do, don't base their
> record systems on them (T, Scheme48, MIT Scheme, Gambit, Chicken, SISC,
> Larceny, Chez, PLT, probably SCM & guile, and anything that uses SLIB
> or Jonathan Rees's records proposal from the late '80s; there are also
> surely a few more that elude my memory right now). So I don't think
> it's really reasonable to just punt arguments on the basis that they're
> solved automatically by such CLOS-style frameworks.
Chicken's records *are* defined in terms of the native OO system which
is Tiny-CLOS.
Guile's records are likewise defined in terms of GOOPS (a Tiny-CLOS
derivative).
You're right that many of the others don't translate records directly
into CLOS-style objects, but most of them do have a CLOS-style system
and therefore could:
http://groups.google.com/groups?hl=en&lr=&c2coff=1&selm=871xpwv30h.wl%40strelka.synthcode.com&rnum=2
The implementations that do not implement records in terms of an OO
system generally implement them as something closer to a C struct. In
C the record-type would not be a first-class object and you could
implement immutability without a performance hit. Arguably if you do
want first class types and introspection in Scheme (which could
require runtime checks for immutability) then you are already moving
away from the simple C structs and closer to a CLOS model.
--
Alex