Re: [PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-22 Thread Kalle Sommer Nielsen
Hi Den man. 13. jul. 2020 kl. 20.37 skrev Levi Morrison : > > Hello everyone, > > I'd like to change the default mode of assertion failures to throw. > The current default is to warn. In my opinion this is a bad strategy: > the engine asserted that something that is expected to be true is not, > s

Re: [PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-22 Thread Nikita Popov
On Wed, Jul 22, 2020 at 5:05 PM Gabriel Caruso wrote: > On Mon, 13 Jul 2020 at 19:37, Levi Morrison wrote: > > > Hello everyone, > > > > I'd like to change the default mode of assertion failures to throw. > > The current default is to warn. In my opinion this is a bad strategy: > > the engine as

Re: [PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-22 Thread Gabriel Caruso
On Mon, 13 Jul 2020 at 19:37, Levi Morrison wrote: > Hello everyone, > > I'd like to change the default mode of assertion failures to throw. > The current default is to warn. In my opinion this is a bad strategy: > the engine asserted that something that is expected to be true is not, > so execut

Re: [PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-22 Thread Brent Roose
Hi Levi I personally almost never use assert, and actually assumed it would throw an error, so this sounds like a good change! Have you done research on how this would affect the top-1000-ish popular packages like Nikita does? Kind regards Brent > On 20 Jul 2020, at 15:48, Levi Morrison via

Re: [PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-20 Thread Levi Morrison via internals
On Mon, Jul 13, 2020 at 11:37 AM Levi Morrison wrote: > > Hello everyone, > > I'd like to change the default mode of assertion failures to throw. > The current default is to warn. In my opinion this is a bad strategy: > the engine asserted that something that is expected to be true is not, > so ex

Re: [PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-14 Thread Marcio Almada
Hi! On Mon, Jul 13, 2020 at 11:52 AM Marcio Almada > wrote: > > > I'd like to change the default mode of assertion failures to throw. > > > The current default is to warn. In my opinion this is a bad strategy: > > > the engine asserted that something that is expected to be true is not, > > > so e

Re: [PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-14 Thread Theodore Brown
On Tue, July 14 2020 at 10:10 AM Levi Morrison wrote: > On Mon, Jul 13, 2020 at 11:52 AM Marcio Almada wrote: > > > I'd like to change the default mode of assertion failures to throw. > > > The current default is to warn. In my opinion this is a bad strategy: > > > the engine asserted that someth

Re: [PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-14 Thread Levi Morrison via internals
On Mon, Jul 13, 2020 at 11:52 AM Marcio Almada wrote: > > I'd like to change the default mode of assertion failures to throw. > > The current default is to warn. In my opinion this is a bad strategy: > > the engine asserted that something that is expected to be true is not, > > so executing furthe

Re: [PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-13 Thread Marcio Almada
Hi! > > Hello everyone, > > I'd like to change the default mode of assertion failures to throw. > The current default is to warn. In my opinion this is a bad strategy: > the engine asserted that something that is expected to be true is not, > so executing further is a bad idea. This leaves throwin

[PHP-DEV] Changing default assertion mode to throw exceptions

2020-07-13 Thread Levi Morrison
Hello everyone, I'd like to change the default mode of assertion failures to throw. The current default is to warn. In my opinion this is a bad strategy: the engine asserted that something that is expected to be true is not, so executing further is a bad idea. This leaves throwing or bailing out.