Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
XP is just a number
 
PerlMonks  

Buzzcutbuddha: (Java Exception Handling)Re: What is it about perl that makes perl so cool?

by buzzcutbuddha (Chaplain)
on Dec 11, 2000 at 12:12 UTC ( [id://46070]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: What is it about perl that makes perl so cool?
in thread What is it about perl that makes perl so cool?

>1) try / catch >I'm not the most experienced java programmer (a year or so
>while i was at school), but i really disliked having to
>check for errors from a method with two separate blocks of
>code. I disliked even more the fact that you had to know
>the specific exception that each method would throw.


Actually I believe that the Java exception handling is quite elegant.
As a developer, you should already have an idea of where your errors might occur
(hence Perl's DIE, which you place after where you think a problem will occur),
and what type they will be (you expect to get an int and the user inputs a double brings about a ParseException)
and so writing Try/Catch statements makes sense. It localizes the error handling to the code that is most likely to bomb out.
Just my $0.02
  • Comment on Buzzcutbuddha: (Java Exception Handling)Re: What is it about perl that makes perl so cool?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://46070]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.