Re: RFC: Expectations

From: Date: Mon, 21 Oct 2013 20:36:03 +0000
Subject: Re: RFC: Expectations
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 2013-10-21 01:20, Joe Watkins wrote:
On 10/21/2013 09:16 AM, Michael Wallner wrote:
On 21 October 2013 10:13, Patrick Schaaf <[email protected]> wrote:
Am 21.10.2013 03:52 schrieb "Joe Watkins" <[email protected]>:
So looks like we need a new name ?? Ideas ??
abstract EXPRESSION
wat?
abstract is already a keyword, so no BC. abstract is not concrete so alludes a bit to the might-be-or-might-not-be-checked nature of the test abstract is the name for the "short summary" intro part of scientific papers, and these conditions are kind of a summary of what is known (preconditions) and concluded (postconditions).
Ah, ok well. I'd rather go for expected() or except() then...
Expected appears to be the most suitable solution suggested so far ... I was following along with the abstract suggestion, I thought that was pretty well thought out, but a bit hard to explain why we are re-using the abstract keyword for something that is completely unrelated to abstract classes all the same ... So for those that see the problem does Expected work around it ?? Cheers Joe
This proposal sounds a lot like exceptions to me or am I missing something :/ Could we do something like throw new expectation($expects, $message);

Thread (51 messages)

« previous php.internals (#69736) next »