[fetter-devel] Request for comments on new interface
Frank Goenninger - PRION Consulting
fgoenninger at prion.de
Sat Oct 8 08:48:12 UTC 2005
Rayiner,
Am 08.10.2005 um 04:33 schrieb Rayiner Hashem:
> The user interface for Verrazano is a bit of a kludge at the moment,
> and I've been working recently on refactoring the code to both enable
> a more sensical and straightforward UI, and also to refactor the
> internals to allow better user control in certain places. This work is
> a prerequisite for things like Visual C++ support and multiple backend
> support. Moreover, I consder a rework of the UI to be a prerequisite
> for a 1.0 release.
>
> Right now, what I have is a procedural interface to the generator's
> internals. What I need is a good way of allowing the user to specify a
> configuration. The idea is to dump the special .binding file, as Kenny
> suggested, and go with a set of macros. My first thoughts are to make
> generate.lisp look like this:
>
> (verrazano:defbinding cairo
> (:name "cairo-library")
> (:nicknames "cairo")
> (:include "cairo/cairo.h"
> "cairo/cairo-pdf.h"))
>
> (verrazano:defhost winvc++
> (:compiler :vc++) ; or :g++
> (:gccxml-path "")
> (:gccxml-command "gccxml")
> (:temp-directory "/tmp"))
>
> (verrazano:deftarget cffi-lispy
> (:backend :cffi)
> (:name-style :lisp-style) ; or :c-style
> (:search-mode :strict)) ; or :helpful (better name???)
>
> (verrazano:create-binding
> :binding cairo
> :host winvc++
> :target cffi-lispy
> "testsuite/cairo/cairo-library.lisp")
>
> Basically, the specification of the configuration is split up into a
> binding describing the header files to incorporate, a host describing
> the host platform, and a target describing what backend to use and
> what code generation options to enable. Common hosts like "winvc++" or
> "lingcc" would be built into Verrazano, so you could pass something
> like "verrazano:winvc++" to CREATE-BINDING, without having to redefine
> it each time.
>
> I'd love to recieve any comments that would help me make this
> interface better (or suggest to me to scrap it entirely and do
> something else :)
I actually like it. It's clean and precise IMHO. I often do things
this way also:
(verrazano:create-binding
:binding ((:name "cairo-library")
(:nicknames "cairo")
(:include "cairo/cairo.h" "cairo/cairo-pdf.h"))
:host (( ...)))
- you get the idea, I assume. As this should be supported by your
macros already I'd love to go with it.
Thanks!
Cheers,
Frank
More information about the fetter-devel
mailing list