At 01:26 PM 7/5/2001 -0500, David M. Lloyd wrote:
>Here's a feature suggestion for Perl 6.
>
>It would be nice to be able to tell the interpreter to call a user-defined
>C function between opcodes. This could make it easier to implement
>debuggers, profilers, etc. as well as providing a method of safely using
>asynchronous callbacks that certain C libraries like to use.
Yup, that's how the event handling stuff will be handled.
>Of course, if you guys already have a better scheme in mind, don't let me
>stop you. :-)
You've pretty much got it. The flag-checking will be hardwired, but there's
no reason that the function called can't be user-defined. Being able to
install an arbitrary number of user-defined inter-opcode (and
inter-statement) functions seems to make sense, and I don't see it as
incurring any extra costs, so... (As long as you don't mind that it doesn't
necessarily happen in a truly compiled version of your program)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk