John Porter wrote:

> So, instead of "throw": "throwup".

That leads me down the path of "puke" and "scrub" instead of "throw" and
"catch".  Actually, I rather liked the "oops" Scott suggested, but used in
place of "throw" instead of a rename of "exception".  So how about "oops" and
"recover" instead of "throw" and "catch"?

And, like Mr. Nicol, I see no need to "try" keywords from other languages.
"Finally" we've found someone who is producing some results from innovative
thinking to the exception handling problem, instead of just picking some
other language's nose^Wsemantics.

Perhaps we can "continue" such discussions, "except" that maybe the
moderators will shut down this thread to avoid misuse of keywords.

More seriously, I agree there is no need for a "try" keyword... it just
starts a block, which could just as well be any other block.  So using oops
to throw, and recover to catch, no try needed... and no exception objects
needed either, but they could be used if people want them...

{ # so called "try" block... just another block, or even a simple statement
   # here's an example of an "oops"

   if ( $flibberty < $gibbet ) {

      oops ( 43 #< error code >#, $flibberty, $gibbet, @moreparams );
   }
}
recover {

#<<end_comment

  Inside this recover block, @_ contains the parameters supplied to oops
  That way they can be referenced via the usual mechanisms.

end_comment

  # choose what to handle

  if ( $_[0] < 100 )  {
   print "Error $_[0]: bad values for flibberty-gibbet: ", $_[1] - $_[2],
          "@moreparams\n";
   }
   else {
      oops ( @_ );
   }
}


--
Glenn
=====
There  are two kinds of people, those
who finish  what they start,  and  so
on...                 -- Robert Byrne



____________NetZero Free Internet Access and Email_________
Download Now     http://www.netzero.net/download/index.html
Request a CDROM  1-800-333-3633
___________________________________________________________

Reply via email to