[Top][All Lists]

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

Re: [patch] subordinate SMOBs with GOOPS superclasses

From: Ludovic Courtès
Subject: Re: [patch] subordinate SMOBs with GOOPS superclasses
Date: Sun, 09 Dec 2007 18:33:37 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)


Andy Wingo <address@hidden> writes:

> On Tue 27 Nov 2007 07:57, "Marco Maggi" <address@hidden> writes:

> +A special smob type is implemented to overcome the 255 limit on the
> +number of smob types. Its procedures dispatch the call to procedures
> +referenced by a subsmob descriptor.
> Sounds really byzantine. The tagging system has that aspect to it, yes,
> but perhaps there's a point where the complexity is too much.

That was my reaction too.

I don't have any clear idea on how to solve it in the short term.  In
the longer term, my feeling is that we could have a Scheme-level FFI (in
the spirit of what Jon Wilson posted some time ago [0]) that would allow
the creation of subrs (aka. "primitive procedures") at run-time through
a simple API.  We'd have only one "SMOB" for opaque C pointers, which
bindings for C libraries would wrap in structs, records or classes to
provide the required type safety.

I reckon it doesn't help much in the short term, but I'm a bit wary
about adding more complexity to the thing.



reply via email to

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