Oh! This is right; what a mess...
I have to think my design avoiding as much as possible using callbacks
from C++.
Thanks for the information.
StepH


-----Original Message-----
From: skaller [mailto:[EMAIL PROTECTED] 
Sent: 11 juillet 2006 12:22
To: Stephane Le Dorze
Cc: [email protected]
Subject: Re: [Felix-language] garbage collection.

On Wed, 2006-07-12 at 01:37 +1000, skaller wrote:

> Indeed. The assurance is that Felix is just a C++ code generator.
> You can mix up your Felix and raw C++ code as required.

BTW: I call this 'seamless integration'.

The language pair with the most seamless integration
around is obviously C++: it integrates C almost perfectly.

Felix is next best, even though it isn't a syntactic
extension.

The ability to lift C++ INTO Felix is very well supported
with binding constructions such as:

        type int = "int";
        fun add: int * int -> int = "$1+$2";

The ability to embed Felix INTO C++ is not nearly as
well supported. The compiler does this the 'painful'
way in three cases:

(a) embed Felix code inside generated regular lexers
(b) embed Felix code inside elkhound parsers
(c) callbacks

The code is nasty and complex. I quiver in fear at the
thought of adding yet another such embedding. At present
the 'generic' technology to do this reliably is poorly
developed. This needs to be fixed.. I know what needs to
be done semantically .. I just don't know how to model
it syntactically.

Basically you have a C++ class, for example:

        class X { 
                int x;
                void g() { .. }
                void f() { .. PUT FELIX CODE HERE .. }
        };

and you want the Felix code in f() to be able to access
g() and x. However Felix code requires access to

(a) the thread frame pointer, and,
(b) its ascendants (parents)

and that stuff must be added into the class X as variables
in the right form AND added to the X constructors, to pass
the relevant data in. This is precisely what is done
for Elkhound, so that user actions can access their
environment .. even though a C++ class gets in between
the user actions and the environment -- the class is
required by Elkhound itself .. it has to be compatible
with BOTH the Elkhound and Felix requirements!

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to