[PEPr] Comment on PHP::Assert
| From: | Jesper Veggerby | Date: | Thu, 11 Aug 2005 17:48:39 +0000 |
| Subject: | [PEPr] Comment on PHP::Assert | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39328@lists.php.net to get a copy of this message | ||
Jesper Veggerby (http://pear.php.net/user/nosey) has commented on the proposal for PHP::Assert.
Comment:
Carsten:
I agree that you the it might be easier to read, but my point was much the
same as Joshua (perhaps he put it more eloquently). The value this package
adds does not all overweight the resources spent on having to load, parse
and call the method (IMHO and apparently also Travis' figures).
Perhaps it could be better to use the assert() method to clearify that you
asserting the statement, but since assert() drops a warning and returns
true or false, I'd personally prefer the simple "if"-check and the
exception, which you can at least catch in a try-catch (somewhere in the
call-stack!) Not as assert() where you only can "catch" it at the
assertion point (also with and if (and you have to use @assert()). If you
want to clearify that you are asserting you can always comment your code
:p
/Jesper
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