[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    [PHP-DEV] Re: Array Of
From:       Daniel Lowrey <rdlowrey () gmail ! com>
Date:       2014-02-28 19:04:25
Message-ID: CAH8Mpnm-PrL75Cd4riHNb7eZF8_zT2jEuN2c47Wj1aXNvGdokA () mail ! gmail ! com
[Download RAW message or body]


I appreciate the time and effort Joe and Phil put into this, but I'm voting
"no" because ...

-  Having an O(n) typehint does not feel like a good solution to me. People
have argued that variadics are also O(n) so there's no real difference
between the two. I disagree because no one in his or her right mind would
pass 100,000 parameters to a function. This would not be at all uncommon
for an array, though. IMO If you have to stop and consider the performance
implications of the typehint or remember to only use the hint once then
you've already severely limited its usefulness.

- I don't see enough benefit *at this time* to be had from tying ourselves
to this syntax. In my view there would need to be more benefit than
eliminating the trivial foreach block you'd currently need to perform this
check in userland.

- I think it more sensible to spend time cleaning up existing
bugs/functionality/idioms than bolting on superfluous new things here and
there. Every syntax addition is a potential future BC problem, and while it
may seem like a good idea now opinions can change and better ideas can
arise. If you're shackled to a particular syntax it can make future
improvements more painful.

- I'm not sure that there's a strong consensus for generics at this point.
Implementing a stopgap measure to simulate a watered-down subset of
generics functionality feels premature to me.

These are just my feelings after reading the relevant discussions. Thanks
again for the work you guys put into this.

Daniel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic