Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71347 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28029 invoked from network); 20 Jan 2014 20:36:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2014 20:36:52 -0000 Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.212.178 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.212.178 mail-wi0-f178.google.com Received: from [209.85.212.178] ([209.85.212.178:34536] helo=mail-wi0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/A8-02192-2E88DD25 for ; Mon, 20 Jan 2014 15:36:51 -0500 Received: by mail-wi0-f178.google.com with SMTP id cc10so3609095wib.11 for ; Mon, 20 Jan 2014 12:36:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=4n4RYnfTjOBQMfU3mG3RLpU2IKDRbZ0dLqwccv7fl50=; b=QU3Q3qdH62jJSRoSLrdjolHtxBakevUc6VJ4Bidrr9aemduGaBJ6S6VCxhnuj07mvu lUaWj4kfSZAMczUGFYpyzG4kzF5sDsf6yOs9plfqSW713nW0ntdDeDryNNEIvc55+7rP +TFwZzNInufQTk7Czan/H9cUIhoTIK58j4XJAp4pT75ZV9pMsNP02OU2Yo7wfJC/FzTv MC009h1YpZdY76Do0DF99LNGpJpZj040otvY4GNCT4coY4sGkjSiIHNtGvmjwbKEOsDF e4iTWvgWY19NRHv+etc2YA6384K2ca3bTus04kv1kozTksd+d9xB5pt+P4kOukV5Ys6y YASA== X-Gm-Message-State: ALoCoQmEILG3hdCoQ/zYvybKcGpX5x8/mY0OeJGj1HXG5SgPmozMJzaPhVczdBaiCJRMuxF5fwkK X-Received: by 10.194.234.65 with SMTP id uc1mr15907174wjc.39.1390250207861; Mon, 20 Jan 2014 12:36:47 -0800 (PST) Received: from [192.168.43.248] (188.29.164.179.threembb.co.uk. [188.29.164.179]) by mx.google.com with ESMTPSA id y13sm3439860wjr.8.2014.01.20.12.36.46 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 20 Jan 2014 12:36:47 -0800 (PST) Message-ID: <52DD88DC.2080402@pthreads.org> Date: Mon, 20 Jan 2014 20:36:44 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Sara Golemon , internals@lists.php.net References: <52DCA3E7.80602@lerdorf.com> <52DCED71.3020207@pthreads.org> <006301cf15f5$22f8df60$68ea9e20$@tutteli.ch> In-Reply-To: Content-Type: multipart/alternative; boundary="------------000305050106050102070300" Subject: Re: [PHP-DEV] Introducing "Array Of" RFC From: pthreads@pthreads.org (Joe Watkins) --------------000305050106050102070300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 01/20/2014 08:20 PM, Sara Golemon wrote: >>> 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 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 --------------000305050106050102070300--