MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Efficiency of try..endtry




Can anyone give me an idea of which of these code segments will be more 
efficient to try to call a verb that I do not know exists?

[A] ...
    try
      #2:blah(foo);
    except (E_VERBNF)
      #2:notfound();	
    endtry
    ...

[B] ...
    if (blah in verbs(#2))
      #2:blah(foo);
    else
      #2:notfound();
    endif
    ...

I understand that [B] won't succeed if "blah" is defined on an ancestor 
of #2, but I'm not worried about that at the moment.

Thanks. :)

Colin

Colin McCormick
Tripod, Inc.
http://www.tripod.com



Follow-Ups:

Home | Subject Index | Thread Index