[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Avoid GOOPS in (system foreign-object)?
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] Avoid GOOPS in (system foreign-object)? |
Date: |
Fri, 22 May 2015 10:42:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Hi Mikael,
Mikael Djurfeldt <address@hidden> skribis:
> Sadly, I nowadays only have time to look at guile-devel briefly now and
> then. I did this now and happened to see this.
Good to read you here! :-)
> 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...
The struct layout strings are a bit clunky, indeed. ;-) I like the
flexibility that GOOPS provide, especially when it comes to extending
things like ‘equal?’, ‘write’, and so on.
I think it’s better if GOOPS is not a requirement for basic interfaces
like this SMOB replacement, though. One of the concerns is performance.
For instance, in 2.0, start-up time with GOOPS is on the order of 3
times higher than without it, as measured with:
time for i in `seq 1 30` ; do guile -c '(use-modules (oop goops))' ; done
Thanks for your feedback!
Ludo’.