>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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.