Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98866 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90672 invoked from network); 24 Apr 2017 23:09:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2017 23:09:31 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.47 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.214.47 mail-it0-f47.google.com Received: from [209.85.214.47] ([209.85.214.47:36034] helo=mail-it0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/45-36901-BA58EF85 for ; Mon, 24 Apr 2017 19:09:31 -0400 Received: by mail-it0-f47.google.com with SMTP id g66so8878067ite.1 for ; Mon, 24 Apr 2017 16:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=++9r2SVvt7KxuKeohJeIVSjRC9QRw0sERPDyGYfPYKE=; b=T9HODv3cczQga42Ex3orrVUUUVi6ibosk37O6efnlxG1fJUNCg1+YS8M6yq9eN85z+ LhKmJUhVD2g20J0u2y9F1iXGcq7XFMOx/I2mdGBCYjD0OuOIU+YLNOICXABsbDICY6We 0tRkn3CtNURhx9Q6D/UoUfKFZivEFGTpVA4a+9p6x3MsiaR+jkFrNr9gVc6tqs5TukzX HE1H4XZ0B2GXY+dn8YPW2nC2YAa1RUpP1AWupMSOeIuIozKGft2jbIplAx5M94rQOOWY X5UwNmotdlxCbRUFdE5bY8be4LWHjbGLvc4j+bUDa7HuauY/G3LcKU7S4BNuZ96+OM6P NgGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=++9r2SVvt7KxuKeohJeIVSjRC9QRw0sERPDyGYfPYKE=; b=ZbtOc51JqzExjy5s1e3J0b9jTYbvCr6PLj9JcWk66vOWA01rk+DV0AoACwrPP0c1UI CV8uTpwnTA4mY0gHMxXx7IIp6wvCQ2mfVCW2dWDuwcADPz8ztZ2dbRgwMg0RauwknwtC LK7k3Fhl49ngCnEg17MZiOhWGCRdypudCWsnhlZiEP/Ncyhcl+oRhK0hMgpmw1xdDBpj VaMNF4JkOwtAye8uqAjh2U8IyuMU+PhJ+ZMpe3eEK6VT9oxcQA19ga7mp4nrlfOEqOkU nwvR6TLQedcN+mWnJXuZ5KifoCLOkz7aoeXWk/uyMACuI4jNwhzXrEvwg7kT/4ttWYPE OC0Q== X-Gm-Message-State: AN3rC/5UGRR5RQcnUdzVVvVFH8uSEbvzeNZ8Yyd9BtxNcNJnCmvTqgV+ A2GR+t2DMWADAQ== X-Received: by 10.36.89.207 with SMTP id p198mr161532itb.71.1493075368628; Mon, 24 Apr 2017 16:09:28 -0700 (PDT) Received: from Stas-Air-4469.local (108-233-206-104.lightspeed.sntcca.sbcglobal.net. [108.233.206.104]) by smtp.gmail.com with ESMTPSA id f14sm8656428iod.5.2017.04.24.16.09.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Apr 2017 16:09:27 -0700 (PDT) To: Sara Golemon , PHP internals References: <82da5975-aaca-580c-50ae-0b034d14b124@fleshgrinder.com> Cc: Colin O'Dell Message-ID: <5280684d-193b-dda8-efc6-903422522d7a@gmail.com> Date: Mon, 24 Apr 2017 16:09:26 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Enable strict_types checking for curl_setopt() From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > I disagree. From the user's perspective it is argument typing. The Not really. Argument typing is when arguments have types. curl_setopt arguments do not have known types, they have business logic inside that says if argument X is equal to this, then argument Y must be of that type. It's very different from what strict_types does. > internal implementation detail of that argument type being dependent > on another arg's value is just a detail. It's not "just a detail", it's the whole point of it. The value argument does not have a know type, it is typed only when you know the exact value of another argument (and sometimes not even then - e.g. CURLOPT_POSTFIELDS accepts both strings and arrays). We don't have "type that is defined by another type" in the type system, it's clearly business logic. Which I have no problem with, but it shouldn't be part of type system then. -- Stas Malyshev smalyshev@gmail.com