in reply to Re: the assertion pragma
in thread the assertion pragma

Thank you for taking the time to respond.

The most helpful link was the perl-porters link, which lead me to this discussion of the assertion pragma started by Ricardo SIGNES started in June, 2007, a month before it was removed: Assertions, warts, and all. The upshot of the discussion is that

So how did this conversation turn into a decision to remove the pragma? It seems to me that the goals were good and there were other ways to address the last issue without removing the pragma. Why were they not taken?

The goal of reducing line noise is essential to code readability. The goal of flexible assertion strategy is essential to encouraging people to actually use assertions. One way to deal with die unless foo_ok would be to prohibit any sub marked as an assertion from being part of a conditional. This would structurally enforce a core tenet of assertions: they shouldn't have side effects in operational code.

The reason I asked the question is that neither the perl delta nor the CPAN assertions module (both of which you cited) explains the decision. The CPAN module doesn't even mention it. It was last updated in June, 2005 and the decision to remove the assertions pragma took place two years later in July, 2007. A general search on "assertions" (which I did both via google and perl monks) tends to mostly show up lots of stuff on regular expressions.

beth

Replies are listed 'Best First'.
Re^3: the assertion pragma
by Anonymous Monk on Dec 19, 2008 at 11:05 UTC
    An idea, best to ask those who remove it :)