Re: Introducing "Array Of" RFC

From: Date: Mon, 20 Jan 2014 20:20:31 +0000
Subject: Re: Introducing "Array Of" RFC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-71346@lists.php.net to get a copy of this message
>> ArrayOf: "I would like hammers in a bag." >> Generics: "I would like a bag of hammers." > > I don't want to bicker analogies but yours is inaccurate. You have to > specify a specific type of bag, ask it to be constructed before being > passed to the method which checks for it, and that is not at all the > same as checking contents of an argument being passed. > And yet you bicker. Specify a type of bag: Applies regardless. It's a bag of hammers, then specifying has been done. Ask it to be constructed: Applies regardless. That's was $x = array(); is. Checking contents: The topic of the RFC is typed arrays (or arrays containing a type, if you prefer). For that to be meaningful the contents much be checked. They can be checked at call time, population time, or compile time. They are however, being checked. > The two things are very different. > The two ways of looking at them are different. The metaphor is the same. > It would be like saying: "Why would you ever want to type-hint for a > callable, when you can create a CallableWrapper object, pass it a > callable in a setter, then check for the object name." Obviously that > is not a viable suggestion, and that is what is being discussed as an > alternative for this arrayof RFC by trying to replace them with > generics. > > This is a full-on hijack. > Bullshit. To borrow your expression; That's got fuck-all to do with what we've been discussing. You're just making shit up at this point and you need to cut that crap out. NOBODY IS SUGGESTING REPLACING "array" WITH AN OBJECT. I don't know how much clearer I can state that. > I see they have an overlap, and they have been discussed. I am however > pointing out (to others) that using generics in place of this feature > is not as wonderful of a solution as they seem to think, and using the > syntax is not ideal for other reasons (also discussed). > Discussed, but your position is not taken as fact. In fact, I've taken rather the opposite conclusion since I see a number of unaddressed problems with the original RFC. Based on those problems not being addressed, I'm currently leaning on the side of voting "No", despite the fact that I'd generally like to see some sort of arrayof (whether or not it looks like a generic). Further, posts like yours which seek to shut down relevant discussion stand out as a very large call against the RFC. I'm sorry that you want to shut your own RFC down, but I'm not going to make guesses at your reasons for that. > Discussing them is one thing. Discussions are great. When that > discussion leads to the suggestion of using one instead of the other, > well... that leads us to where we are now: stuck in the mud. > Where is discussion supposed to lead if NOT to a preference for a course of action? -Sara

« previous php.internals (#71346) next »