Re: RFC: Expectations

From: Date: Tue, 22 Oct 2013 17:20:38 +0000
Subject: Re: RFC: Expectations
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 22 October 2013 02:08, Derick Rethans <[email protected]> wrote:
> I'm pretty convinced that expectations *without* exceptions are a good
> idea, as using assert (which is really eval) is a nasty thing that
> should be replaced, but IMO exception throwing should not be part of
> this feature.

I agree that something to replace the eval-based assert() would be
good. What if the new syntax simply respected assert_options(), and
assert_options() was extended to support an explicit ASSERT_EXCEPTION
control option (that presumably took an exception class name as its
option value)? That seems like it would provide the exception based
possibilities that some posters want while maintaining the same
assertion behaviour that users are already used to by default.

Adam, who apologises if this has been suggested before — this was a
long set of threads and I've been busy.


Thread (51 messages)

« previous php.internals (#69769) next »