Re: RFC: Expectations
| From: | Andrea Faulds | Date: | Mon, 21 Oct 2013 20:42:37 +0000 |
| Subject: | Re: RFC: Expectations | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69737@lists.php.net to get a copy of this message | ||
On 21/10/2013 21:36, rparker@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". -- Andrea Faulds http://ajf.me/