Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82944 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80691 invoked from network); 17 Feb 2015 11:30:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2015 11:30:31 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.177 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.220.177 mail-vc0-f177.google.com Received: from [209.85.220.177] ([209.85.220.177:52506] helo=mail-vc0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/00-13350-45623E45 for ; Tue, 17 Feb 2015 06:30:30 -0500 Received: by mail-vc0-f177.google.com with SMTP id hy10so12279012vcb.8 for ; Tue, 17 Feb 2015 03:30:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Zr0V1NydLMODxGTa83vxogjXkgLBKPg6BjW132vJnpQ=; b=lLe4DfGrBoRgb8C7T005ex6gdVesKk8D9PWZl6M5Rv9YHQ6/quRTIVNQCWnIncrzLd YcCsuC5DuDtRb6SJGhx5G73oF1FjXfi8+DJRV9fY2GzyLEqf2YczC61gicECDZKBnL/u +QA2Jo40qGZd8jtptJmp5JumiJRjltXmujXjfvgM5hVKXo4yroCHk6VSCfYEYptSbLiB pNU3LB5RrhTnz1zzDs7Nru4LOgLOnCF6iob3W8Asd2ravcaNHJ1T6nk41rPZ2uYEzUD3 u1SWW+cM+oKMma6GhEBesr46AV9fFCTlRtLAewG3RO7r3GIPrG4NA/rb+WYpND53D9bt b8PA== MIME-Version: 1.0 X-Received: by 10.220.73.3 with SMTP id o3mr1443460vcj.78.1424172625130; Tue, 17 Feb 2015 03:30:25 -0800 (PST) Received: by 10.52.179.168 with HTTP; Tue, 17 Feb 2015 03:30:24 -0800 (PST) In-Reply-To: References: <011801d04a07$83ab1c00$8b015400$@php.net> <016f01d04a3a$e9183220$bb489660$@php.net> <54E290E5.3020508@lerdorf.com> <54E2AD88.6040206@lerdorf.com> Date: Tue, 17 Feb 2015 11:30:24 +0000 Message-ID: To: Sara Golemon Cc: Rasmus Lerdorf , francois@php.net, Philip Sturgeon , Arvids Godjuks , Jefferson Gonzalez , Rowan Collins , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Reviving scalar type hints From: leight@gmail.com (Leigh) On 17 February 2015 at 05:48, Sara Golemon wrote: >>> We can sigh and tut about this not being "the PHP way", but the script >>> author was the one who chose to enter into a tight contract, and the >>> script author, not you, is the one who should have that authority over >>> their own application. >> >> I find this view way too extreme. >> > You find giving authority over an application to the application > author too extreme? And you find taking authority over a library away from the library author completely acceptable? If I write an API that works perfectly well in strict mode, why shouldn't I be able to turn strict on for my whole library? Do I just tell users that non-strict mode constitutes undefined behavior for this library, and refuse to fix any bugs that come up because of it? I'm sure I could find a way of detecting non-strict mode and throw a fatal, or force access through a facade/wrapper of some sort where I've turned on strict and made myself the caller. Isn't this equally unhelpful? The point is some people will want strict turned on, and they will find ways to force it on people. You're going to have to live with it, so just make it a possibility from the outset.