Re: [VOTE][RFC] Array Of

From: Date: Sat, 01 Mar 2014 15:08:11 +0000
Subject: Re: [VOTE][RFC] Array Of
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Fri, Feb 28, 2014 at 1:00 PM, Adam Harvey <[email protected]> wrote:
> On 28 February 2014 09:45, Andrea Faulds <[email protected]> wrote:
>>
>> On 28 Feb 2014, at 17:30, Bob Weinand <[email protected]> wrote:
>>> I voted no now.
>>>
>>> a) This is something for PHP6 I feel (at least if the other RFCs were rejected for
>>> similar reasons)
>>> b) We are so close to beta 5.6 now, I think we should stop introducing bigger features
>>> which affect the language etc. now
>>> c) I'm not really sure if we want that feature... but that's another story...
>>
>>
>> I also voted against. I don't like the [] syntax and PHP 5.6 is too close.
>
> I was also -1, partly for those reasons, but also because I think we
> need to take some time (probably in a PHP 5++/6/7/whatever context and
> after 5.6 has been frozen) to figure out if we want generics and, if
> so, what form they would take syntactically. My guess is that they
> won't look anything like ClassName[], and I don't really want another
> weird syntax appendix that we have to maintain and document for a
> decade or more to come.
>
> Adam

The trouble with that approach is that we could have this feature now.
It would be useful to many (my twitter feed is blowing up over this
one) and would be very simple for people to understand. It's been
simple to implement and it's just all-round simple.

Generics on the other hand are somewhat less simple, we need to work
out templates and all that other fun stuff, and we need to work out if
people even want the feature. Behind the scenes there is a LOT of code
to change and things will have to have a major overhaul. So in the end
we could miss out on adding a great feature that plenty of people want
purely to find out that nobody wanted generics anyway.

This should not even be seen as a rush to implement a weak version
that ruins things and gives us a weird double syntax. It should be
seen as a simple version then if later on generics are implemented
they are a much more powerful feature which has a different syntax.
People can use [] without ever having to understand the complexity of
generics and templates and all that.

At this point suggesting we shouldn't have [] and should make everyone
use generics feels a little bit like banning fishing rods but handing
out grenades.


Thread (13 messages)

« previous php.internals (#72888) next »