On 10/21/2013 09:42 PM, Andrea Faulds wrote:
On 21/10/2013 21:36, rpar...@yamiko.org wrote:
This proposal sounds a lot like exceptions to me or am I missing
something :/
Could we do something like throw new expectation($expects, $message);
Er, T_EXPECT will be essentially a clone of Java and Python's assert
statement, but not called assert because of the existing assert()
function (and backwards-compatibility is PHP's middle name).
Unless you mean the similar name. Well, I don't think "exception" and
"expect" can be confused (though as someone who used to use Python, I
keep reading this as "except", Python's equivalent to "catch"), though
"ExpectationException" might be confusing. I think we should name it
"AssertionException".
I think it would be more confusing for expect to throw an
AssertionException.
Cheers
Joe
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php