Re: [PHP-DEV] [RFC] Allow throwing exceptions from __toString()

2019-05-01 Thread M. W. Moe
Hello, the _convert_to_string return signature should be changed i.e returning a status; hence, accordingly to this status, within a context caller, you may decide to trigger an exception or not ; that's not the role of a conversion function to handle those concerns; thus the realm is wider than

Re: [PHP-DEV] [RFC] Allow throwing exceptions from __toString()

2019-05-01 Thread Bishop Bettini
On Wed, May 1, 2019 at 7:36 AM Dan Ackroyd wrote: > On Wed, 1 May 2019 at 03:54, Bishop Bettini wrote: > > > > But I'd still think this would be a "many eyes needed" kind of PR, > especially from extension maintainers. > > Hypothetically, what should these extension maintainers be looking for? >

Re: [PHP-DEV] [RFC] Allow throwing exceptions from __toString()

2019-05-01 Thread Dan Ackroyd
On Wed, 1 May 2019 at 03:54, Bishop Bettini wrote: > > But I'd still think this would be a "many eyes needed" kind of PR, especially > from extension maintainers. Hypothetically, what should these extension maintainers be looking for? Other than "Mmm-hmm. Mmm-HMM. I know some of these words!" ?

Re: [PHP-DEV] [RFC] Allow throwing exceptions from __toString()

2019-04-30 Thread Bishop Bettini
On Tue, Apr 30, 2019 at 2:49 PM Stanislav Malyshev wrote: > > That said, the work done on the patch is super impressive. I am > reasonably sure that Nikita caught as many instances of something going > wrong when string conversion fails as humanly possible. And I agree that > banning exceptions d

Re: [PHP-DEV] [RFC] Allow throwing exceptions from __toString()

2019-04-30 Thread Stanislav Malyshev
Hi! > Please could someone anyone who understands the implications for what > this means for the internals of the PHP engine provide some detailed > reasons for why this shouldn't be approved, if there are any reasons. > > Otherwise voters might 'irresponsibly' vote yes, without being aware of th

Re: [PHP-DEV] [RFC] Allow throwing exceptions from __toString()

2019-04-30 Thread Dan Ackroyd
On Tue, 30 Apr 2019 at 14:33, Nikita Popov wrote: > > Hi internals, > > I've already brought up this topic on list a couple of weeks ago... I've > now updated the implementation based on feedback at the time, and turned > this into a proper RFC: This RFC is probably beyond the capabilities of mos

[PHP-DEV] [RFC] Allow throwing exceptions from __toString()

2019-04-30 Thread Nikita Popov
Hi internals, I've already brought up this topic on list a couple of weeks ago... I've now updated the implementation based on feedback at the time, and turned this into a proper RFC: https://wiki.php.net/rfc/tostring_exceptions Regards, Nikita