Re: [VOTE] "Array Of" v Generics

From: Date: Fri, 24 Jan 2014 15:43:08 +0000
Subject: Re: [VOTE] "Array Of" v Generics
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Fri, Jan 24, 2014 at 10:27 AM, Andrea Faulds <[email protected]> wrote:
>
>
> On 24/01/14 03:20, Philip Sturgeon wrote:
>>
>> Can you lot vote A, B, C or D to show your interest?
>>
>> A) I want Array Of, but not Generics
>> B) I want Generics, but not Array Of
>> C) I want both
>> D) I want neither
>
>
> 1. Why is this a separate RFC? ...or is it?

Array of and Generics would be a different RFC from each other.
Array-of will go in first, Generics will come in later. I am asking
people to let me know if they give a hoot about generics, so we can
work out what is happening with the array of syntax.


> 2. That's not really what the discussion previously was about. Can we
> instead have a vote on:
>
> A) I want Foo[] syntax
> B) I want Array<Foo> syntax
> C) Neither

The discussion went to email between Sara G, Joe W and myself. They
brought me around and improved my understanding of generics - as I
explained it had one fatal flaw - and Sara explained that once "array
of" is in, generics would be a logical move to follow up.

We're at this point of:

"do we use "array of" syntax "Foo[]" and then later on if we want
generics do we add array<Foo> for generics, leaving the two features
available like in Java, but of course allow the rest of generic
functionality like $foo = new Tool<Spanner>();"

or

"do we use the generics syntax for this regardless, consider "array
of" to be "weak generics" then add full-on generics later on using the
same syntax"

This survey was intended to help a decision be made for the above two
statements. They actually match your A or B, but I wanted more insight
into how the group felt before trying to specifically force a syntax.
People might like the A syntax, but if that gets voted in we have
trouble down the road if people want generics, but if people dont want
generics then happy days who cares lets push A.

Can you see why insight is helpful here instead of just plowing on
into a dumb-vote? :)


Thread (13 messages)

« previous php.internals (#71510) next »