Re: Introducing "Array Of" RFC
| From: | Joe Watkins | Date: | Mon, 20 Jan 2014 20:36:44 +0000 |
| Subject: | Re: Introducing "Array Of" RFC | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71347@lists.php.net to get a copy of this message | ||
On 01/20/2014 08:20 PM, Sara Golemon wrote:
Sara,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.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.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
We, actually I, put a wall up between this and generics because I thought it was the correct thing to do, I thought easier to explain to everyone when generics do come along, and I want them to come along .... I don't really want them to like this, but can quite easily be wrong, and probably am ...
Phil is not shutting down conversation but trying to keep it focused on what he sees are the issues.
We appreciate your involvement, of course :)https://github.com/krakjoe/php-src/compare/arrayof-generics
He kept them separate because I told him to, I see them as such, I use them as such, we're both quite happy to discuss a more PHP way of doing things ... the syntax is not all important, I was only trying to be sensible, like I said, I can easily be wrong ...
If we can just get back to being friendly and productive that'd be great.Cheers Joe