I rather see people writing decent code that tries to recover and do the right thing.
True - but when you don't know who's going to use your module, and in what ways, it may be difficult to know what the right thing is, but that's a fair point.

Personally I do mix exceptions and return values depending on the module and script (not quite as chaotic as it sounds :) - I've certainly found that a fairly judicial use of exceptions can clean code up no end, and the less code I write, the less chance for error.

I've built a few larger applications/modules around Exception::Class, and I'd hate to try to re-implement them checking every return value, but as I said in an earlier post, I always found exceptions in Java a pain in the **** for the reasons you've stated.

As for P6 - who knows? Every time I read (or try to read) an appocalypse I feel worried, but then Damian usually manages to make it all sound ok. The only thing I've seen so far that sounds terrible is whitespace determining how a method is called - P6 should definitely absorb some of Pythons better features, but I'd prefer it if they left whitespace the hell alone :)


In reply to Re: Re: Re: Re: <rant>CPAN modules failing to check for write errors</rant> by Anonymous Monk
in thread <rant>CPAN modules failing to check for write errors</rant> by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.