[PEPr] Comment on RFC::Assert
| From: | Carsten Lucke | Date: | Thu, 11 Aug 2005 13:14:29 +0000 |
| Subject: | [PEPr] Comment on RFC::Assert | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39321@lists.php.net to get a copy of this message | ||
Carsten Lucke (http://pear.php.net/user/luckec) has commented on the proposal for RFC::Assert.
Comment:
IMHO PEAR would definitely benefit of a package like that!
Didn't have a look at the source but the interface look good so far. I
would add methods like:
Assertion::assertNull($obj)
Assertion::assertNotNull($obj)
Assertion::check($conditionThatHasToBeTrue)
This would help to realize "design by contract" and that wouldn't only be
useful for in-package assertions but also for bigger applications! I would
implement a switch to turn the assertions on/off (just like PHP allows for
internal assertions).
However, I like this proposal!
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=285
--
Sent by PEPr, the automatic proposal system at http://pear.php.net