guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Avoid GOOPS in (system foreign-object)?


From: Mikael Djurfeldt
Subject: Re: [PATCH] Avoid GOOPS in (system foreign-object)?
Date: Fri, 22 May 2015 09:58:11 +0200

Hi Ludovic,

Sadly, I nowadays only have time to look at guile-devel briefly now and then.  I did this now and happened to see this.

Just wanted to say that I think that we (or at least I) at some point in time had the goal to replace structs with pure GOOPS data structures. In the context of FFI, this would allow you to be more flexible than what structs allow, ultimately being able to access arbitrary C structs and C++ structs/classes directly from Scheme.  I find that a proper MOP (which maybe still is not fully developed) is a nicer way to handle non-standard access than the strange character strings in struct vtables...

Happy hacking!

Mikael

On Thu, May 21, 2015 at 5:28 PM, Ludovic Courtès <address@hidden> wrote:
Hello!

I would like to have foreign object types based on structs rather than
GOOPS classes.

The rationale is that GOOPS is normally not loaded unless the user
explicitly asks for it; having (system foreign-objects) load it would
add overhead even for users who just want SMOB-like functionality.

WDYT?

The preliminary patch attached is an attempt to do that.  Somehow, the
creation of GOOPS classes for vtables doesn’t work as I thought, which
means that ‘test-foreign-object-scm’ cannot define methods and so on
(which I agree is useful functionality.)  What am I missing?

Thanks!

Ludo’.

PS: The reason I’m looking at it is that I would really want us to
    release 2.0.12 ASAP, so any changes to this API must be settled.



reply via email to

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