Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-07 Thread Nikita Popov
On Thu, Jul 5, 2018 at 12:51 AM, Christoph M. Becker wrote: > On 05.07.2018 at 00:20, Kalle Sommer Nielsen wrote: > > > Den tor. 5. jul. 2018 kl. 00.15 skrev Yasuo Ohgaki : > > > >> Since the issue is incompatibility between current "continue" and > "break", > >> how about provide a tool replace

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Christoph M. Becker
On 05.07.2018 at 00:20, Kalle Sommer Nielsen wrote: > Den tor. 5. jul. 2018 kl. 00.15 skrev Yasuo Ohgaki : > >> Since the issue is incompatibility between current "continue" and "break", >> how about provide a tool replace "continue" to "break" where it is >> applicable. >> (Raise error for

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Kalle Sommer Nielsen
Den tor. 5. jul. 2018 kl. 00.15 skrev Yasuo Ohgaki : > Since the issue is incompatibility between current "continue" and "break", > how about provide a tool replace "continue" to "break" where it is > applicable. > (Raise error for invalid "continue" usage also. This would be a bug most > likely.)

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Yasuo Ohgaki
On Mon, Jun 25, 2018 at 1:17 AM Nikita Popov wrote: > Hi internals, > > Another small deprecation for your consideration... > > https://wiki.php.net/rfc/continue_on_switch_deprecation > > Regards, > Nikita > This great improvement. IMO. Since the issue is incompatibility between current

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Stanislav Malyshev
Hi! > Should I just go ahead and implement the warning (with no intent of > future removal), or do we want to still go through the RFC here? I think it's ok to just add the warning, unless somebody objects. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Nikita Popov
On Wed, Jul 4, 2018 at 5:28 PM, Christoph M. Becker wrote: > On 04.07.2018 at 16:51, Zeev Suraski wrote: > > > On Wed, Jul 4, 2018 at 5:15 PM Nikita Popov > wrote: > > > >> On Wed, Jun 27, 2018 at 11:07 PM, Stanislav Malyshev < > smalys...@gmail.com> > >> wrote: > >> > In the proposal, the

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Christoph M. Becker
On 04.07.2018 at 16:51, Zeev Suraski wrote: > On Wed, Jul 4, 2018 at 5:15 PM Nikita Popov wrote: > >> On Wed, Jun 27, 2018 at 11:07 PM, Stanislav Malyshev >> wrote: >> In the proposal, the code is valid in all versions of PHP up to and including 7.3, *and represents the same

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Zeev Suraski
On Wed, Jul 4, 2018 at 5:15 PM Nikita Popov wrote: > On Wed, Jun 27, 2018 at 11:07 PM, Stanislav Malyshev > wrote: > > > Hi! > > > > > In the proposal, the code is valid in all versions of PHP up to and > > > including 7.3, *and represents the same algorithm in all versions*. The > > > only

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Nikita Popov
On Wed, Jun 27, 2018 at 11:07 PM, Stanislav Malyshev wrote: > Hi! > > > In the proposal, the code is valid in all versions of PHP up to and > > including 7.3, *and represents the same algorithm in all versions*. The > > only difference would be the side-effect of issuing an additional > >

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread Stanislav Malyshev
Hi! > In the proposal, the code is valid in all versions of PHP up to and > including 7.3, *and represents the same algorithm in all versions*. The > only difference would be the side-effect of issuing an additional > deprecation notice; that's not "a different meaning". In PHP 8, under >

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread Rowan Collins
On 26 June 2018 at 19:27, Nikita Popov wrote: > a) In PHP "switch" is considered a looping structure, for this reason > "break" and "continue" both apply to "switch", as aliases. For PHP, these > are reasonable semantics, as PHP supports multi-level breaks. It would be > very questionable if

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread niel
On 27/06/18 17:08, Nikita Popov wrote: On Wed, Jun 27, 2018 at 5:59 PM, Rowan Collins mailto:rowan.coll...@gmail.com>> wrote: On 27 June 2018 at 16:45, niel mailto:spam-f...@blueyonder.co.uk>> wrote: > On 24/06/18 17:16, Nikita Popov wrote: > >> Hi internals, >>

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread niel
On 27/06/18 16:59, Rowan Collins wrote: On 27 June 2018 at 16:45, niel wrote: On 24/06/18 17:16, Nikita Popov wrote: Hi internals, Another small deprecation for your consideration... https://wiki.php.net/rfc/continue_on_switch_deprecation Regards, Nikita Could you clarify the PHP 8

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread Nikita Popov
On Wed, Jun 27, 2018 at 5:59 PM, Rowan Collins wrote: > On 27 June 2018 at 16:45, niel wrote: > > > On 24/06/18 17:16, Nikita Popov wrote: > > > >> Hi internals, > >> > >> Another small deprecation for your consideration... > >> > >> https://wiki.php.net/rfc/continue_on_switch_deprecation > >>

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread Rowan Collins
On 27 June 2018 at 16:45, niel wrote: > On 24/06/18 17:16, Nikita Popov wrote: > >> Hi internals, >> >> Another small deprecation for your consideration... >> >> https://wiki.php.net/rfc/continue_on_switch_deprecation >> >> Regards, >> Nikita >> >> > Could you clarify the PHP 8 changes: > > "PHP

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread Chase Peeler
On Wed, Jun 27, 2018 at 11:46 AM niel wrote: > On 24/06/18 17:16, Nikita Popov wrote: > > Hi internals, > > > > Another small deprecation for your consideration... > > > > https://wiki.php.net/rfc/continue_on_switch_deprecation > > > > Regards, > > Nikita > > > > Could you clarify the PHP 8

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread niel
On 24/06/18 17:16, Nikita Popov wrote: Hi internals, Another small deprecation for your consideration... https://wiki.php.net/rfc/continue_on_switch_deprecation Regards, Nikita Could you clarify the PHP 8 changes: "PHP 8 generates a compile error." Does this mean *any* use of continue in

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread Rowan Collins
On 27 June 2018 at 16:14, niel wrote: > On 26/06/18 21:49, Rowan Collins wrote: > >> On 26/06/2018 20:28, niel wrote: >> >>> On 24/06/18 17:16, Nikita Popov wrote: >>> Hi internals, Another small deprecation for your consideration...

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread niel
On 26/06/18 21:49, Rowan Collins wrote: On 26/06/2018 20:28, niel wrote: On 24/06/18 17:16, Nikita Popov wrote: Hi internals, Another small deprecation for your consideration... https://wiki.php.net/rfc/continue_on_switch_deprecation Regards, Nikita IMO the proposed illustrations will lead

RE: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-27 Thread Zeev Suraski
> -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: Tuesday, June 26, 2018 9:28 PM > To: Stanislav Malyshev > Cc: PHP internals > Subject: Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch > > This RFC reso

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-26 Thread Stanislav Malyshev
Hi! > Do you mean that this code would be valid in both PHP 7 and PHP 8, but > mean different things? > > while($outer) { >     while($inner) { >         switch($foo) { >             case 1: >                 continue 2; >         } >     } > } > I think this would be unacceptable, because WTF

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-26 Thread Rowan Collins
On 26/06/2018 20:28, niel wrote: On 24/06/18 17:16, Nikita Popov wrote: Hi internals, Another small deprecation for your consideration... https://wiki.php.net/rfc/continue_on_switch_deprecation Regards, Nikita IMO the proposed illustrations will lead to as much, if not more, WTF from other

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-26 Thread niel
On 24/06/18 17:16, Nikita Popov wrote: Hi internals, Another small deprecation for your consideration... https://wiki.php.net/rfc/continue_on_switch_deprecation Regards, Nikita IMO the proposed illustrations will lead to as much, if not more, WTF from other language users as current

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-26 Thread Stanislav Malyshev
Hi! > This leaves us in a position where "continue" means different things in > PHP and in other syntactically similar languages, causing confusing for > programmers familiar with them. This is solved by simply prohibiting the > case that is ambiguous. This is not a loss for PHP developers (who

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-26 Thread Nikita Popov
On Mon, Jun 25, 2018 at 7:53 AM, Stanislav Malyshev wrote: > Hi! > > On 6/24/18 9:16 AM, Nikita Popov wrote: > > Hi internals, > > > > Another small deprecation for your consideration... > > > > https://wiki.php.net/rfc/continue_on_switch_deprecation > > Not sure I understand - what this is

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-06-24 Thread Stanislav Malyshev
Hi! On 6/24/18 9:16 AM, Nikita Popov wrote: > Hi internals, > > Another small deprecation for your consideration... > > https://wiki.php.net/rfc/continue_on_switch_deprecation Not sure I understand - what this is improving? Yes, continue being the same as break is slightly surprising, but it