>>>>> "Autrijus" == Autrijus Tang <[EMAIL PROTECTED]> writes:

    Autrijus> On Fri, May 20, 2005 at 10:34:39AM +0100, Colin Paul
    Autrijus> Adams wrote:
    >> I have a problem with this - namely that the function is
    >> variadic, and the interface generator can't cope with this.

    Autrijus> Hmm, in Haskell FFI, we hard-coded two cases of
    Autrijus> invocation, treating the function as two distinct,
    Autrijus> non-variadic forms:

    Autrijus>     -- From
    Autrijus> http://svn.openfoundry.org/pugs/src/Pugs/Embed/Parrot.hsc

    Autrijus>     -- This is the (() returns Void) form foreign import
    Autrijus> ccall "Parrot_call_sub" parrot_call_sub_vv ::
    Autrijus> ParrotInterp -> ParrotPMC -> CString -> IO ()

    Autrijus>     -- This is the ((String, String) returns String)
    Autrijus> form foreign import ccall "Parrot_call_sub"
    Autrijus> parrot_call_sub_SSS :: ParrotInterp -> ParrotPMC ->
    Autrijus> CString -> ParrotString -> ParrotString -> IO
    Autrijus> ParrotString

    Autrijus> Surely you can do the same with Eiffel?

Yes, I can, but that only copes with a single string parameter - there
are very many possibilities (strictly, infinite, though obviously not
in practice).
Also, I shall want to use the object/method calls, which adds further
to the burden.

And I'm not just coding this for my XSLT processor - I am going to
make the Eiffel library freely available to all Eiffel programmers.
That way, any Eiffel program can use any Parrot-targetted scripting
language as an extension language (and the language can be chosen by
the user of the application who wants to do the scripting, not imposed
by the developer of the application).
So this requires a lot of flexibility.

I can easily code by hand (and will, for now) just those subroutines
and methods I shall require for use within my XSLT processor, but to
do them all in general will be too much (so I shall have to request
each application deleoper to add the code necessary that they want).

And this applies to anyone else who wants to use Parrot as a
multi-lingual extension mechanism for another language.
-- 
Colin Adams
Preston Lancashire

Reply via email to