Peter Scott <[EMAIL PROTECTED]> wrote:

 > At 09:36 AM 2/22/2001 +0000, David Grove wrote:
 > >This is what's scaring me about all this talk about
 > >exceptions... it can break this mold and make Perl into a "complainer
 > >language" belching up uncaught (don't care) exceptions forcing
try/except
 > >blocks around every piece of IO or DB handling. The style
 > >
 > >try {
 > >   open(FOO, "./foo");
 > >}
 > >catch FileOpenException $e {
 > >   die "Drat:" .$e->Message. "\n";
 > >}
 > >
 > >is horrifying to me over the normal
 > >
 > >open(FOO, "./foo") or die "Drat:$!\n";
 >
 > Now steady on. No-one is proposing getting rid of the normal way of
doing
 > it. We're just talking about beefing up another WTDI.  There are
 > situations
 > in programs that have dozens or hundreds of lines of code which benefit

 > from the exception model just as much as your example.

Actually, I have heard talk among us about eliminating $! and return
values from such functions as open(). This was likely extremicisit view
during the RFC's but the image stuck pretty hard.

Anyway, the point was that perl as a high level language isn't safe
because it's safe but because it makes decent assumptions. Bounds
checking, the example given, doesn't exist because there are no bounds...
at least not in a comparative sense. It has "no arbitrary limits" even if
you impose them yourself (well, in similar matters and with good
programming). The benefits of this particular high-level language are
often a redefinition of language concepts. Comparing Perl bounds checking
with "superior" bounds checking in C++ and (gack) VB is comparing apples
with a nectarine... or glued-together quartz flakes with a pearl.

p


Reply via email to