|
Boost : |
Subject: Re: [boost] Request for Interest in eval
From: Christian Hoermann (0oo0oo0.c_at_[hidden])
Date: 2008-09-21 09:06:06
> I don't see the point of creating yet another scripting language.
> If it were real C++, it would be cool, but it doesn't seem to be.
The point is not to create a scripting language. The point is that
an eval script can take an existing instance from a C++
program and modify that (as well as create instances of
existing classes and pass those back to the compiled program).
So, part of a compiled C++ program could be transferred into
a script (and then changed without recompiling the program);
however, trying to write an entire program inside a script
would be an abuse of the library.
So, to clarify, when you write a << b; the library will call the
appropriate operator<< method or function and that's it;
there's no notion of interpreting the meaning of the code,
beyond figuring out which function/method needs to be
called. The flow of control would then pass to the actual
compiled function, just as if you had written the function
call in your program and compiled it. So, it's very much
strictly a C++ thing.
Now, the actual syntax of the scripts is not yet finalized.
I guess one could consider it slightly more relaxed than
real C++ because all variables are of a gerneric type,
rather than specific type. I'm very much interested in
feedback on this issue. An example script and eval header
is available at http://eval.sourceforge.net
Christian
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk