Re: [RFC] Enable strict_types checking for curl_setopt()
| From: | Fleshgrinder | Date: | Tue, 25 Apr 2017 17:28:58 +0000 |
| Subject: | Re: [RFC] Enable strict_types checking for curl_setopt() | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98880@lists.php.net to get a copy of this message | ||
On 4/25/2017 5:56 PM, Sara Golemon wrote:
> On Mon, Apr 24, 2017 at 9:00 PM, Michał Brzuchalski
> <michal.brzuchalski@gmail.com> wrote:
>> I agree with Stanislav. IMHO argument types are valueable when are
>> reflective by reflection and curl_setopt has no valuable info by reflection
>> and will never be. Curl implementation also uses resources cURL handle is
>> used.
>>
> Literally zero internal functions have argument type reflection
> (beyond class and array types). curl_setopt() is not and would not be
> any different in this regard.
>
> https://3v4l.org/2BtPW
>
>> Maybe it's time to refactor and provide objects with option setters
>> with argument types?
>>
> I do agree there. I've got a WiP "cURLi" extention in my homedir that
> I've been poking at since ZendCon 2016. I suppose if we don't put
> type checking in curl_setopt() then that'll just push users who care
> about type safety towards cURLi. :D
>
> -Sara
>
Way to go. This RFC is just wrong, and not _simply_ about semantics.
--
Richard "Fleshgrinder" Fussenegger
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc