At 9:12 AM +0200 5/6/04, Leopold Toetsch wrote:
A bit less typing for NCI calls:

1) declare the pmc type as NCI

  .local NCI the_sub
   # get it from somewhere e.g.:
   # the_sub = global "ncurses::initscr"

2) just call it:

   r = the_sub(args)

Works only for named subs of course.

This saves a savetop/restoretop pair and creating a return continuation, because a plain "invoke" is emitted for the function call.

I'm pretty sure this isn't a good idea, unless we want to introduce a number of enforced safety constructs. (Mainly PMC immutability, namespace slots that can't be layered over, and namespace slots that can't be changed) Someone may choose to swap out the PMC for a sub to do any number of things, some of them even reasonable. (Mostly wrapping them, but there are others, I expect)
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to