Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69741 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51248 invoked from network); 22 Oct 2013 07:23:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2013 07:23:51 -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:10666] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/B6-10840-60826625 for ; Tue, 22 Oct 2013 03:23:50 -0400 To: internals@lists.php.net,Andrea Faulds Message-ID: <52662803.5000603@php.net> Date: Tue, 22 Oct 2013 08:23:47 +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> <526591BD.9060406@ajf.me> In-Reply-To: <526591BD.9060406@ajf.me> 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:42 PM, Andrea Faulds wrote: > 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". > I think it would be more confusing for expect to throw an AssertionException. Cheers Joe