Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98905 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34171 invoked from network); 29 Apr 2017 15:01:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2017 15:01:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.181 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.128.181 mail-wr0-f181.google.com Received: from [209.85.128.181] ([209.85.128.181:35765] helo=mail-wr0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 68/85-01540-3EAA4095 for ; Sat, 29 Apr 2017 11:01:55 -0400 Received: by mail-wr0-f181.google.com with SMTP id z52so46400106wrc.2 for ; Sat, 29 Apr 2017 08:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:cc:from:message-id; bh=ARUvmaZBYduY6PJcyds34t1hbkuir21Gid0nsuQte1s=; b=afw6lSIA7D8Lltgdznxo3v6pDK06DJ3RSLtGZ9aF2DWp1GCy8waPMNO1sYsV8GKUrW 5QyaJP8MhqXbSdn6KV0uC5Flu6jiGNmEdnMEfh8+1E6AII+Wocr1Qf16GPQ7Yt2FAIsx VTnddrxdyqtkOgn0zTbH+gRvwZLAvFUvsA8G3Z9lf5nu5xsx4TNyn2tCQs/+whalWa9h kshzJUxMVAiCWUMmYoG067MWf7ipmmqqyp3ciYpYBMK1ms0jHoMDWmPLyUcmdnVPl9wn RIK5jutkFls4lfUuHHoicwez2P/aWfIHM4YZvh422FxP5G7YIWAtaBoOM+vGOkzR0amN kmLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:cc:from :message-id; bh=ARUvmaZBYduY6PJcyds34t1hbkuir21Gid0nsuQte1s=; b=As6/y55kHzzpP3Pye3+KjvB3eWMSoj2vP73PT2viJcIXFDdvKC7lWosKdZveIiOPMd kTKlEynSDmQsdKQ0/WzyJeQjDeqNzG/r+nwZSHP/sMTL3lwdKMNk4XtS0Zdun3r7L3WK /NsArLacosynE+OveNUDyOHmvVNozeclFna1MeaKFyutsoXEvcUQ09DdFT7M6qaejsxu 8AfQo4Btbt5pfIKbiHvtVE/rMXUyIgrTEsX54V5WTK0EIcJCJHKcrWzb/0v/vbHkjoR3 FbrvjASQBe9snAhM98NVy10Z1CTgup9YsV7kMM3K6YE49zbpb4G0QsfHK85DtAslgbGi yeLw== X-Gm-Message-State: AN3rC/4YLwftjgd5+LN46k9x8KxBLW3YvTLOb2CH4kalaYF9Mg1NveH3 BufgwmngX+ww6beY/sI= X-Received: by 10.223.148.5 with SMTP id 5mr7922014wrq.44.1493478112554; Sat, 29 Apr 2017 08:01:52 -0700 (PDT) Received: from [10.61.139.48] (188.29.164.128.threembb.co.uk. [188.29.164.128]) by smtp.gmail.com with ESMTPSA id s29sm5163554wrb.21.2017.04.29.08.01.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Apr 2017 08:01:51 -0700 (PDT) Date: Sat, 29 Apr 2017 16:01:50 +0100 User-Agent: K-9 Mail for Android In-Reply-To: References: <398456D8-170A-4629-B6FF-D64F6DDB9C9A@gmail.com> <5B258485-B7EE-4DCD-B93F-B036E9B6D4CC@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----LP9MIHVC5S18694311GRR7IHB7U2O8" Content-Transfer-Encoding: 7bit To: Sara Golemon CC: PHP internals Message-ID: <8F7D0233-DB1A-4617-8E92-C1719D4D385D@gmail.com> Subject: Re: [PHP-DEV] [RFC] Enable strict_types checking for curl_setopt() From: rowan.collins@gmail.com (Rowan Collins) ------LP9MIHVC5S18694311GRR7IHB7U2O8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 29 April 2017 00:30:06 BST, Sara Golemon wrote: >On Fri, Apr 28, 2017 at 6:05 PM, Rowan Collins > wrote: >>>I reject the idea of making a worse API for the sake of an artificial >>>purity standard which has long since been violated elsewhere=2E >> >> Personally, I think if we were designing from scratch, having a >> setHeaders method which took an array (and an associative >> one at that) would seem a better API than a weird polymorphic >> function with a manual page a mile long=2E >> >We can agree on this, and others in this thread have said as much as >well=2E I've also mentioned that I've been poking at a new curl binding >since last November=2E Funnily enough, it's a mix of a >monolithic/polymorphic setOpt() method and where appropriate, >setSomeSpecificThing() methods=2E That mix sounds very reasonable=2E Does it still make you go "eww" to sugg= est that those settings that don't deserve their own method, and take a boo= lean argument rather than a string or int, could have a different method, s= uch as setFlag? Because that's really all I was suggesting: a more visible = distinction that said "this method always takes a boolean", rather than "th= is method must be given a boolean if given this, that, or the other"=2E Meanwhile, I'll repeat that if there really is precedent for functions val= idating their arguments based on both strict_types mode and the value of so= me other parameter, then my concern (mostly) evaporates, and I suspect othe= rs' might also=2E I just checked through the thread and RFC, and can't see = these examples being named, so I would very much appreciate a specific exam= ple=2E Perhaps the precedents seem obvious to you, and that's why this whole conv= ersation is frustrating you? It definitely feels like there is some miscomm= unication, because you seem surprised that people have any concerns at all= =2E Regards, --=20 Rowan Collins [IMSoP] ------LP9MIHVC5S18694311GRR7IHB7U2O8--