Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69740 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48509 invoked from network); 22 Oct 2013 06:57:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2013 06:57:12 -0000 X-Host-Fingerprint: 80.4.21.210 cpc22-asfd3-2-0-cust209.1-2.cable.virginmedia.com Received: from [80.4.21.210] ([80.4.21.210:14257] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/36-10840-7C126625 for ; Tue, 22 Oct 2013 02:57:11 -0400 To: internals@lists.php.net,rparker@yamiko.org Message-ID: <526621C4.2020208@php.net> Date: Tue, 22 Oct 2013 07:57:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 References: <3D.BC.23638.84CA1625@pb1.pair.com> <000301cecd1b$9aa133f0$cfe39bd0$@tutteli.ch> <526488C1.8020400@php.net> <5264E3DC.7080603@php.net> <738f83906a93f9c499827d0d31047b28@yamiko.org> In-Reply-To: <738f83906a93f9c499827d0d31047b28@yamiko.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 80.4.21.210 Subject: Re: [PHP-DEV] RFC: Expectations From: krakjoe@php.net (Joe Watkins) On 10/21/2013 09:36 PM, rparker@yamiko.org wrote: > 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 wrote: >>>> Am 21.10.2013 03:52 schrieb "Joe Watkins" : >>>>> >>>>> 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); Yes, you are missing something.