MOO-cows Mailing List Archive


raise() built-in...

I finally remembered the reason that I would prefer a 4th argument to
raise() over a reraise; statement.  A lot of times I've had a loop where I
wanted to call a series of verbs and still let them trace back, but not have
them interfere with the normal operation of the verb.  Right now, that's
usually done by putting a fork() around the verb call but that has a number
of drawbacks and can't be used if you want a return value or if you need the
verbs to run before the next segment of code.  If there was a 4th argument
to raise(), something like this could be done:

  count = 0;
  for x in (calls)
    {obj, vrb, arg} = x;
        count = count + obj:(vrb)(@arg);
      except e (ANY)
        fork (0)

This wouldn't work with a reraise (or bounce) statement because it would
have to be outside of the fork.

Home | Subject Index | Thread Index