Simon Cozens <[EMAIL PROTECTED]> wrote:
> Counter-counterproposition: Look at the way Sapphire does it. I'm really
> proud of that. It's automagically switchable from inlines to ordinary
> functions to macros. You can choose which wins, and it's neat to debug.
Hear, hear! This is exactly what I was trying to get at. It will
*not* cause undue obfuscation and *will* enforce discipline.
BTW, Simon, I really want to collaborate with your Sapphire work or
merge it with the stuff I've been doing. My files are not in any
compilable form at the moment, but you can see them using...
echo :pserver:[EMAIL PROTECTED]:/home/cvs A >> ~/.cvspass
mkdir pickle pickle/CVS
cd pickle
echo :pserver:[EMAIL PROTECTED]:/home/cvs >CVS/Root
echo pickle >CVS/Repository
touch CVS/Entries
cvs update
The basic methodology uses C++ inheritance from the Perl 5 structs
typedef'd in perl.h, such as struct interpreter (PerlInterpreter) and
struct sv (SV). My subclasses add only methods, no members, and no
virtuals. Thus, the results are binary-compatible with Perl 5.
Then I wrap the whole thing in some completely opaque structs to build
a library whose interface does not require any perl headers and lets
programs work with different configurations, such as MULTIPLICITY,
without recompilation.
-John