Re: [PHP-DEV] RFC - Array Of for PHP 7

2017-11-02 Thread Mark Randall
On 03/11/2017 02:27, Andrea Faulds wrote: Your proposed objects would not be usable everywhere an array is, because they're not arrays, and by converting to an array you lose the type info, so we still have to iterate over the whole thing to type check. This would be significantly less useful

Re: [PHP-DEV] RFC - Array Of for PHP 7

2017-11-02 Thread Andrea Faulds
Hi, Mark Randall wrote: On 01/11/2017 01:36, Andrea Faulds wrote: Thank you for bringing this up. The introduction of nullables means that the type[] syntax is problematic and should probably be avoided now. As you say, there is an issue of ambiguity as to whether it would be interpreted as

Re: [PHP-DEV] RFC - Array Of for PHP 7

2017-11-02 Thread Michael Morris
On Thu, Nov 2, 2017 at 3:21 PM, Larry Garfield wrote: > > While I normally strongly agree with supporting all traversables, not > just arrays, in this case I don't think it works. Hmm.. You're right. Traversables would be best served by having another method to indicate

Re: [PHP-DEV] [RFC][VOTE] Flexible Heredoc and Nowdoc Syntaxes (voting restarted)

2017-11-02 Thread Stanislav Malyshev
Hi! > As per feedback here, I have updated the first voting question for > additional clarification. This has restarted the vote for the first > question only. The second vote will continue as normal, and both will > still end on the same date (November 15th). Thank you! -- Stas Malyshev

Re: [PHP-DEV] RFC - Array Of for PHP 7

2017-11-02 Thread Larry Garfield
On 11/01/2017 11:31 PM, Michael Morris wrote: > Drupal 8 accomplishes this through assert() and a helper class. > > function foo ( array $a ) { > assert( Inspector::assertAllStrings( $a )); > } > > This could be improved by having an collectionof operator similar to the > instanceof operator. >

Re: [PHP-DEV] RFC - Array Of for PHP 7

2017-11-02 Thread Mark Randall
On 01/11/2017 01:36, Andrea Faulds wrote: Thank you for bringing this up. The introduction of nullables means that the type[] syntax is problematic and should probably be avoided now. As you say, there is an issue of ambiguity as to whether it would be interpreted as (?int)[] or ?(int[]).

Re: [PHP-DEV] [RFC][VOTE] Flexible Heredoc and Nowdoc Syntaxes (voting restarted)

2017-11-02 Thread Peter Cowburn
On 2 November 2017 at 11:35, Thomas Punt wrote: > Hi all, > > > > I would add that this is particularly important on an RFC with two or > more votes. On most RFCs, the voting question is implied to be "accept the > change/feature as described above", but as soon as you have

Re: [PHP-DEV] [RFC][VOTE] Flexible Heredoc and Nowdoc Syntaxes (voting restarted)

2017-11-02 Thread Thomas Punt
Hi all, > I would add that this is particularly important on an RFC with two or more > votes. On most RFCs, the voting question is implied to be "accept the > change/feature as described above", but as soon as you have two votes, it's > important to be clear which parts of the proposal are

Re: [PHP-DEV] [RFC][VOTE] Flexible Heredoc and Nowdoc Syntaxes

2017-11-02 Thread Rowan Collins
On 2 November 2017 04:24:17 GMT+00:00, Stanislav Malyshev wrote: >Hi! > >> From the body of the RFC: >> >> "To enable for the closing marker to be indented, ... The indentation >> of the closing marker dictates the amount of whitespace to strip from >> each line within the

Re: [PHP-DEV] Re: RFC - Array Of for PHP 7

2017-11-02 Thread li...@rhsoft.net
Am 02.11.2017 um 10:55 schrieb Tony Marston: "Kalle Sommer Nielsen"  wrote in message I fail to see how it offers "negative benefits to the vast number of programmers who are happy with the language as it currently exists", I If it's put into the language then it affects 100% of the users,

Re: [PHP-DEV] Re: RFC - Array Of for PHP 7

2017-11-02 Thread Tony Marston
"Kalle Sommer Nielsen" wrote in message news:CAJW__o3QJOe6G3ybmBcoCU=fcadjzacgbktijrbm3rs8q0h...@mail.gmail.com... Hi Tony 2017-10-31 11:35 GMT+01:00 Tony Marston : This strikes me as being nothing more than a micro-optimisation that does nothing but pander to the