Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-19 Thread Yasuo Ohgaki
Hi Zeev, On Wed, Mar 18, 2015 at 6:43 PM, Zeev Suraski z...@zend.com wrote: FWIW, as someone who did play with the patch (both patches, of course), I'm not sure why people are claiming you don't understand the RFC. Your comments in the code are 100% accurate, which means you understood

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-19 Thread Yasuo Ohgaki
Hi all, On Thu, Mar 19, 2015 at 6:37 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: On Wed, Mar 18, 2015 at 6:43 PM, Zeev Suraski z...@zend.com wrote: FWIW, as someone who did play with the patch (both patches, of course), I'm not sure why people are claiming you don't understand the RFC.

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Pavel Kouřil
On Mon, Mar 16, 2015 at 10:03 PM, Anthony Ferrara ircmax...@gmail.com wrote: All, Voting has been closed on the scalar type declarations v0.5 RFC: https://wiki.php.net/rfc/scalar_type_hints_v5 At a final score of 108:48, it has been accepted for PHP 7. Thank you. Anthony -- PHP

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Pavel Kouřil
On Wed, Mar 18, 2015 at 11:01 AM, Pierre Joye pierre@gmail.com wrote: On Mar 18, 2015 4:56 PM, Pavel Kouřil pajou...@gmail.com wrote: On Mon, Mar 16, 2015 at 10:03 PM, Anthony Ferrara ircmax...@gmail.com wrote: All, Voting has been closed on the scalar type declarations v0.5 RFC:

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Florian Margaine
Hi, Le 18 mars 2015 11:06, Pavel Kouřil pajou...@gmail.com a écrit : On Wed, Mar 18, 2015 at 11:01 AM, Pierre Joye pierre@gmail.com wrote: On Mar 18, 2015 4:56 PM, Pavel Kouřil pajou...@gmail.com wrote: On Mon, Mar 16, 2015 at 10:03 PM, Anthony Ferrara ircmax...@gmail.com wrote:

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Pierre Joye
On Mar 18, 2015 4:56 PM, Pavel Kouřil pajou...@gmail.com wrote: On Mon, Mar 16, 2015 at 10:03 PM, Anthony Ferrara ircmax...@gmail.com wrote: All, Voting has been closed on the scalar type declarations v0.5 RFC: https://wiki.php.net/rfc/scalar_type_hints_v5 At a final score of

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Patrick ALLAERT
Le mer. 18 mars 2015 à 10:56, Pavel Kouřil pajou...@gmail.com a écrit : Hello, how will these examples work btw? // a.php ?php declare(strict_types=1); function foo($fn) { $fn(1); }; // b.php ?php require 'a.php'; foo(function (int $a) { return $a * 2; }); // c.php ?php

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Lester Caine
On 17/03/15 23:53, André Rømcke wrote: To help towards that end, can someone who understands what is wanted from the weak type hint mode actually produce a summary of that as it is very difficult to extract just what has now been agreed for that area of type hinting. A base that can be

RE: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Zeev Suraski
-Original Message- From: yohg...@gmail.com [mailto:yohg...@gmail.com] On Behalf Of Yasuo Ohgaki Sent: Wednesday, March 18, 2015 6:44 AM To: Pierre Joye Cc: PHP internals; Leigh; André Rømcke; Lester Caine Subject: Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5 Hi

RE: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Zeev Suraski
FWIW, as someone who did play with the patch (both patches, of course), I'm not sure why people are claiming you don't understand the RFC. Your comments in the code are 100% accurate, which means you understood exactly how it works. Josh Di Fabio just pointed out to me that the code in

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Pavel Kouřil
On Wednesday, March 18, 2015, Patrick ALLAERT patrickalla...@php.net wrote: Le mer. 18 mars 2015 à 10:56, Pavel Kouřil pajou...@gmail.com a écrit : Hello, how will these examples work btw? // a.php ?php declare(strict_types=1); function foo($fn) { $fn(1); }; // b.php ?php

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Pavel Kouřil
On Wed, Mar 18, 2015 at 1:47 PM, Anatol Belski anatol@belski.net wrote: Pavel, On Wed, March 18, 2015 11:05, Pavel Kouřil wrote: On Wed, Mar 18, 2015 at 11:01 AM, Pierre Joye pierre@gmail.com wrote: On Mar 18, 2015 4:56 PM, Pavel Kouřil pajou...@gmail.com wrote: On Mon, Mar 16,

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Anatol Belski
Pavel, On Wed, March 18, 2015 11:05, Pavel Kouřil wrote: On Wed, Mar 18, 2015 at 11:01 AM, Pierre Joye pierre@gmail.com wrote: On Mar 18, 2015 4:56 PM, Pavel Kouřil pajou...@gmail.com wrote: On Mon, Mar 16, 2015 at 10:03 PM, Anthony Ferrara ircmax...@gmail.com wrote: All,

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Pavel Kouřil
On Wed, Mar 18, 2015 at 1:47 PM, Anatol Belski anatol@belski.net wrote: Pavel, On Wed, March 18, 2015 11:05, Pavel Kouřil wrote: On Wed, Mar 18, 2015 at 11:01 AM, Pierre Joye pierre@gmail.com wrote: On Mar 18, 2015 4:56 PM, Pavel Kouřil pajou...@gmail.com wrote: On Mon, Mar 16,

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Nikita Nefedov
On 18 Mar 2015 15:52, Pavel Kouřil pajou...@gmail.com wrote: Hello, I made that conclusion because in the first example, the library kinda forces strict mode rules on the caller, even if he doesn't want to use strict mode - this makes the interoperability of the two modes problematic. This

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Nikita Nefedov
On 18 Mar 2015 14:32, Pavel Kouřil pajou...@gmail.com wrote: On Wednesday, March 18, 2015, Patrick ALLAERT patrickalla...@php.net wrote: Le mer. 18 mars 2015 à 10:56, Pavel Kouřil pajou...@gmail.com a écrit : Hello, how will these examples work btw? // a.php ?php

RE: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Thomas Punt
Hey Pavel, how will these examples work btw? // a.php ?php declare(strict_types=1); function foo($fn) { $fn(1); }; // b.php ?php require 'a.php'; foo(function (int $a) { return $a * 2; }); Result: catchable fatal error Reason: invocation context is in strict mode // c.php ?php

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Pavel Kouřil
On Wed, Mar 18, 2015 at 1:13 PM, Nikita Nefedov inefe...@gmail.com wrote: On 18 Mar 2015 14:32, Pavel Kouřil pajou...@gmail.com wrote: On Wednesday, March 18, 2015, Patrick ALLAERT patrickalla...@php.net wrote: Le mer. 18 mars 2015 à 10:56, Pavel Kouřil pajou...@gmail.com a écrit :

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Pavel Kouřil
On Wed, Mar 18, 2015 at 2:02 PM, Nikita Nefedov inefe...@gmail.com wrote: On 18 Mar 2015 15:52, Pavel Kouřil pajou...@gmail.com wrote: Hello, I made that conclusion because in the first example, the library kinda forces strict mode rules on the caller, even if he doesn't want to use strict

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Christoph Becker
Pavel Kouřil wrote: On Wed, Mar 18, 2015 at 1:47 PM, Anatol Belski anatol@belski.net wrote: for anyone needing to test on Windows, there was builds for an older RFC version http://windows.php.net/downloads/snaps/ostc/scalar_type_hints_2_strict_mode/ but I just made quick builds for

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Chris Wright
On 18 March 2015 at 13:12, Pavel Kouřil pajou...@gmail.com wrote: On Wed, Mar 18, 2015 at 2:02 PM, Nikita Nefedov inefe...@gmail.com wrote: On 18 Mar 2015 15:52, Pavel Kouřil pajou...@gmail.com wrote: Hello, I made that conclusion because in the first example, the library kinda

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Benjamin Eberlei
On Wed, Mar 18, 2015 at 4:28 PM, Chris Wright c...@daverandom.com wrote: On 18 March 2015 at 13:12, Pavel Kouřil pajou...@gmail.com wrote: On Wed, Mar 18, 2015 at 2:02 PM, Nikita Nefedov inefe...@gmail.com wrote: On 18 Mar 2015 15:52, Pavel Kouřil pajou...@gmail.com wrote: Hello,

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Anatol Belski
On Wed, March 18, 2015 14:33, Pavel Kouřil wrote: I've tried the build, and it seems like it's in the strict mode 100% by default, and the declare statement doesn't recognize strict_types (PHP Warning: Unsupported declare 'strict_types'). Is this intentional? No, that's probably me building

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Lazare Inepologlou
2015-03-18 16:28 GMT+01:00 Chris Wright c...@daverandom.com: On 18 March 2015 at 13:12, Pavel Kouřil pajou...@gmail.com wrote: On Wed, Mar 18, 2015 at 2:02 PM, Nikita Nefedov inefe...@gmail.com wrote: On 18 Mar 2015 15:52, Pavel Kouřil pajou...@gmail.com wrote: Hello, I made

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread David Muir
On 18 Mar 2015, at 3:44 pm, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Pierre, On Wed, Mar 18, 2015 at 1:35 PM, Pierre Joye pierre@gmail.com wrote: On Mar 18, 2015 11:26 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: I didn't have my time to spent for the patch. So I don't verify

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Sebastian B.-Hagensen
Hi, 2015-03-18 20:42 GMT+01:00 Lazare Inepologlou linep...@gmail.com: However, it seems that the second form is possible to fail, and that depends on the mode (strict or not) of the library that contains the function a. It does not depend on the mode that I have chosen to work with. The two

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Lazare Inepologlou
2015-03-18 18:30 GMT+01:00 Chris Wright c...@daverandom.com: On 18 March 2015 at 17:07, Lazare Inepologlou linep...@gmail.com wrote: 2015-03-18 16:28 GMT+01:00 Chris Wright c...@daverandom.com: On 18 March 2015 at 13:12, Pavel Kouřil pajou...@gmail.com wrote: On Wed, Mar 18, 2015 at 2:02

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Chris Wright
On 18 March 2015 at 17:07, Lazare Inepologlou linep...@gmail.com wrote: 2015-03-18 16:28 GMT+01:00 Chris Wright c...@daverandom.com: On 18 March 2015 at 13:12, Pavel Kouřil pajou...@gmail.com wrote: On Wed, Mar 18, 2015 at 2:02 PM, Nikita Nefedov inefe...@gmail.com wrote: On 18 Mar

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-17 Thread Yasuo Ohgaki
Hi Andre, On Wed, Mar 18, 2015 at 8:53 AM, André Rømcke andre.rom...@ez.no wrote: TL;DR; weak mode is for api consumers, aka normal php users, while strict is for the actual target users of this features: api (library/framework) creators. How could it possible? On Mon, Mar 16, 2015 at

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-17 Thread Pierre Joye
On Mar 18, 2015 11:26 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: I didn't have my time to spent for the patch. So I don't verify this by myself, but it seems common sense for this RFC. So you voted against it without knowing how it actually works or aims to work? I suggest you to do it now

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-17 Thread Lester Caine
On 17/03/15 02:50, Stanislav Malyshev wrote: Let's get on the road for PHP 7 GA and make it the best PHP release ever. To help towards that end, can someone who understands what is wanted from the weak type hint mode actually produce a summary of that as it is very difficult to extract just what

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-17 Thread André Rømcke
On Mar 17, 2015, at 18:04 , Leigh lei...@gmail.com wrote: On 17 March 2015 at 08:37, Lester Caine les...@lsces.co.uk wrote: To help towards that end, can someone who understands what is wanted from the weak type hint mode actually produce a summary of that as it is very difficult to

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-17 Thread Leigh
On 17 March 2015 at 08:37, Lester Caine les...@lsces.co.uk wrote: To help towards that end, can someone who understands what is wanted from the weak type hint mode actually produce a summary of that as it is very difficult to extract just what has now been agreed for that area of type

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-16 Thread Yasuo Ohgaki
Hi Anthony, On Tue, Mar 17, 2015 at 6:03 AM, Anthony Ferrara ircmax...@gmail.com wrote: Voting has been closed on the scalar type declarations v0.5 RFC: https://wiki.php.net/rfc/scalar_type_hints_v5 At a final score of 108:48, it has been accepted for PHP 7. Congratulations. Even though I

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-16 Thread Stanislav Malyshev
Hi! Voting has been closed on the scalar type declarations v0.5 RFC: https://wiki.php.net/rfc/scalar_type_hints_v5 At a final score of 108:48, it has been accepted for PHP 7. Thank you. Despite my previous disagreement with this RFC, I'd like to thank Anthony for all his work on it and

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-16 Thread Jonathan Wage
Thank you Andrea and Anthony. Your efforts are much appreciated! - Jon On Mon, Mar 16, 2015 at 4:03 PM, Anthony Ferrara ircmax...@gmail.com wrote: All, Voting has been closed on the scalar type declarations v0.5 RFC: https://wiki.php.net/rfc/scalar_type_hints_v5 At a final score of

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-16 Thread Xinchen Hui
On Tue, Mar 17, 2015 at 9:45 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Anthony, On Tue, Mar 17, 2015 at 6:03 AM, Anthony Ferrara ircmax...@gmail.com wrote: Voting has been closed on the scalar type declarations v0.5 RFC: https://wiki.php.net/rfc/scalar_type_hints_v5 At a final score

[PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-16 Thread Anthony Ferrara
All, Voting has been closed on the scalar type declarations v0.5 RFC: https://wiki.php.net/rfc/scalar_type_hints_v5 At a final score of 108:48, it has been accepted for PHP 7. Thank you. Anthony -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-16 Thread Larry Garfield
On 3/16/15 4:03 PM, Anthony Ferrara wrote: All, Voting has been closed on the scalar type declarations v0.5 RFC: https://wiki.php.net/rfc/scalar_type_hints_v5 At a final score of 108:48, it has been accepted for PHP 7. Thank you. Anthony Huzzah! Huge props to everyone that made this

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-16 Thread Trevor Suarez
On Mon, Mar 16, 2015 at 5:04 PM Anthony Ferrara ircmax...@gmail.com wrote: All, Voting has been closed on the scalar type declarations v0.5 RFC: https://wiki.php.net/rfc/scalar_type_hints_v5 At a final score of 108:48, it has been accepted for PHP 7. Thank you. Anthony -- PHP

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-16 Thread Chris Harvey
Congratulations Anthony, and to Andrea for her initial proposal. Finally, we have scalar type hints in PHP. PHP 7 is going to be a real game changer! Chris On 16 Mar 2015, at 9:03 pm, Anthony Ferrara ircmax...@gmail.com wrote: All, Voting has been closed on the scalar type declarations

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-16 Thread André Rømcke
Congratulations Antony, Andrea and (yes) Zeev! Thanks to everyone involved, this is a great step forwards and a perfect wrap for PHP 7.0 RFC proposal freeze :) André On Mar 16, 2015, at 23:05 , Chris Harvey ch...@chrisnharvey.com wrote: Congratulations Anthony, and to Andrea for her