Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98912 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57283 invoked from network); 29 Apr 2017 20:19:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2017 20:19:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 74.125.82.67 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 74.125.82.67 mail-wm0-f67.google.com Received: from [74.125.82.67] ([74.125.82.67:36409] helo=mail-wm0-f67.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/19-01540-A65F4095 for ; Sat, 29 Apr 2017 16:19:57 -0400 Received: by mail-wm0-f67.google.com with SMTP id u65so17101459wmu.3 for ; Sat, 29 Apr 2017 13:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ned8HP5Vz/ztR2h7jgRlSUWV6i3JjpVqt30C1TA/ZQg=; b=a85bDIefy4hroffNmUK0WDdaU0M3DbH3G3Sx9w6rmofblgSLiOArojJSDidLuznJbG 0qIgelnxZ+iLvKCC1vvZlmXvHAiHIk/7tIEgh6XRfMCfW9tpiKYf+X61+fDEm7/HLDwz sNgLfk7mhzuZLT1Wmlvm21luf5h6c9yafD2KWQ6aho8K5D1c3e0Dw6ohwIvT0bkHn6uC RGLEk8KudkA1nBhvWbZR23knXe/JjuTIzXFFsDnEtD6x2L8+EY9CofpYyD3xJipBHK3Y nmUGihvkEXlRm32oMJXCP8gYLnNyZ8oSO8XUe0+JEuVM3hSS61r0d77fXZl6KS/4mvUy NVuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ned8HP5Vz/ztR2h7jgRlSUWV6i3JjpVqt30C1TA/ZQg=; b=B6cZIeTDomEblG71BqeFTT17XEPkkSWX+n0qSksjxClbl/XQOm7yK8p4aQwJpCGvOf Z/0nBF+nFoYpU4CbDr+lICTFvL9uODQfGCVT6bfmEA8wwr8VX8DWKbi53MuUC1LxriU2 3oXR2nS3T5C5G77bGvM6RA2KKXSfMaNE7jCjz/TDbBnfbcWuqzADJyUX7eMj2zLWL0Gn 1tZbohV0rYCmXovj4ZRvAAEVAruo5HtEeNMp66lMtEo82PluP7x+mRJswTGfbl9N7/ov 3qqg7hYOQFAkKE1iZNj49pLzINkoH9DoVV/EeVVWTE1EPgWzWuEhq3HQUKv9B+w+2Hzi q9gg== X-Gm-Message-State: AN3rC/54OZ3dBEfhWnwuTaMZhhUZApNz/pLGfDyHEnUmSOX2zeHfedEz rpZCQNUirGH++ghxGa8DYn78jlfBPg== X-Received: by 10.28.218.67 with SMTP id r64mr2324616wmg.36.1493497192045; Sat, 29 Apr 2017 13:19:52 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.223.157.38 with HTTP; Sat, 29 Apr 2017 13:19:51 -0700 (PDT) X-Originating-IP: [73.9.224.155] In-Reply-To: References: <398456D8-170A-4629-B6FF-D64F6DDB9C9A@gmail.com> <5B258485-B7EE-4DCD-B93F-B036E9B6D4CC@gmail.com> <8F7D0233-DB1A-4617-8E92-C1719D4D385D@gmail.com> Date: Sat, 29 Apr 2017 15:19:51 -0500 X-Google-Sender-Auth: L8rgjz8gplYrU1KJyhTlJK8ad1U Message-ID: To: Rowan Collins Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Enable strict_types checking for curl_setopt() From: pollita@php.net (Sara Golemon) On Sat, Apr 29, 2017 at 2:46 PM, Rowan Collins wrote: > In this case, we should acknowledge that userland cannot > (delta dirty backtrace hack) change behaviour based on > strict types inside the body of the function, and in most > cases neither sold internal functions. We can then decide > if this use case merits breaking that rule or not. > That's a conversation I can agree needs to be had. My position should be pretty obvious wrt curl_setopt(), but I would actually state that I'd go *further* by saying we should allow userland functions to know if they were called strictly or not, and the reason is: Union Types. Union Types (and intersection types and several other complex variants) have been argued against (reasonably, I would say) on the merit that the syntax gets ugly quite quickly and anyway, userspace and implement the equivalent of arbitrarily complex types in the opening body of their functions. What such workarounds *can't* do, is know how much to freak out when called incorrectly. If, as an author of a function, I *want* to respect weak mode, I don't have that option currently (barring said backtrack hacks). I realize this is getting off-topic by venturing into a whole separate RFC discussion, but as you point out it's a salient one when it comes to deciding how much intelligence curl_setopt() should apply. Then again, I think operator overloading belongs in userspace as well, so there's no accounting for taste. -Sara