Re: RFC: Expectations

From: 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 [email protected] to get a copy of this message
On 21/10/2013 21:36, [email protected] 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/

Thread (51 messages)

« previous php.internals (#69737) next »