Hi Mark,
Mark Randall wrote:
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 b
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 t
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 (?i
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 their return type as par
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.
>
>
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[]).
Th
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.
function ( array $a ) {
assert( $a collectionof string );
}
On 31 October 2017 17:37:17 GMT+00:00, Levi Morrison wrote:
> - Our current infrastructure requires us to check every element of
>the array for conformance. While undesirable I believe this can be
>optimized away in the future if we care enough, and therefore not a
>show-stopper.
Do you have a m
Hi Levi,
Levi Morrison wrote:
My thoughts on the RFC:
- The syntax `typename[]` is a poor. Consider how nullability might
bind `?int[]`. Is that `(?int)[]` or `?(int[])` ? Here are some
variants that do not have this issue:
[?int] and ?[int]
array and ?array
Thank you for bringing t
My thoughts on the RFC:
- The syntax `typename[]` is a poor. Consider how nullability might
bind `?int[]`. Is that `(?int)[]` or `?(int[])` ? Here are some
variants that do not have this issue:
[?int] and ?[int]
array and ?array
- Our current infrastructure requires us to check every e
On 25 October 2017 22:52:37 BST, Dan Ackroyd wrote:
>Although 'array of' as well as full blown generics are popular ideas,
>I'm pretty certain the RFC failed due to the type check on the array
>happening every time the 'array of' was passed from one function to
>another, which would make it too sl
On 25 October 2017 at 21:41, Michał Harężlak wrote:
> Hallo,
>
> I think this RFC should be voted again.
Although 'array of' as well as full blown generics are popular ideas,
I'm pretty certain the RFC failed due to the type check on the array
happening every time the 'array of' was passed from
On Wed, Oct 25, 2017 at 4:41 PM, Michał Harężlak wrote:
> I would like to create a RFC for PHP 7, but the same RFC was created and
> declined 3 years ago for PHP 5.4. PHP 7 support much better type hinging so
> I think this RFC should be voted again.
>
> What should I do? Should I create the RPF i
Hallo,
I would like to create a RFC for PHP 7, but the same RFC was created and
declined 3 years ago for PHP 5.4. PHP 7 support much better type hinging so
I think this RFC should be voted again.
What should I do? Should I create the RPF in common way?
Link to mentioned RFC:
https://wiki.php.net
14 matches
Mail list logo