Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82966 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27114 invoked from network); 17 Feb 2015 14:53:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2015 14:53:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.214.175 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.214.175 mail-ob0-f175.google.com Received: from [209.85.214.175] ([209.85.214.175:39620] helo=mail-ob0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/77-19463-7D553E45 for ; Tue, 17 Feb 2015 09:53:11 -0500 Received: by mail-ob0-f175.google.com with SMTP id va2so53918628obc.6 for ; Tue, 17 Feb 2015 06:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/6D4WjL6b7Rrmd1lEajd8rgho9TEgyZ6rUmVuAyGT48=; b=LW6WJvwvgzI53Q3AtrNFHs8hVIJlZG83IglZyTb/DDFEr5QEU4szzLNhSl+92ecicP PMVAsTKTT496q6eV7+vSChoA8bCPniUn6If311yYOCmL9DAD/O/dbr8Y+eUXGo27GOSf pVc3ba1plwM2lOtS61bo39ADbAy0Tz3xNOEMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=/6D4WjL6b7Rrmd1lEajd8rgho9TEgyZ6rUmVuAyGT48=; b=kDxYus7E47ckoSwZPCePD+CBB38zMHIcIzRamQQFKla9VF7k+T6ZAT5FEbSgAc+aGY sEdJbWQCJeDVy9TwM/ykwKGf2rwnHh0DionlnemdumDGbry+Ht0nUMtCLQjJApeqSgbc gWh9e1JiNyEWpWv1TjxGfwnYAOLPy3V0NfFWD7EQRj9Sd7y1NUGAqAS0WMgNBAYoln+5 fiOGgTDctUT8VrRZMD568C5k/HvNAn8XOf1IvafxhddTejizWOwMTpI0DPqNzvSYxISA eZgpT4mrW0SPhpwZhJtAfGFJ0zIzyG8Zwi5eFRxDyqrn35ZwU2XqL8Q1VPSv/CXZf5kR +j+A== X-Gm-Message-State: ALoCoQlFW/M9+W4syek655VgTZ/1giCkH77dnqx2Gg+H54pbWuuNv/gBslwg12U4y7IzmD05/20X MIME-Version: 1.0 X-Received: by 10.182.126.197 with SMTP id na5mr18978985obb.2.1424184788962; Tue, 17 Feb 2015 06:53:08 -0800 (PST) Received: by 10.202.214.205 with HTTP; Tue, 17 Feb 2015 06:53:08 -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 16:53:08 +0200 Message-ID: To: Leigh Cc: Sara Golemon , 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: narf@devilix.net (Andrey Andreev) On Tue, Feb 17, 2015 at 1:30 PM, Leigh wrote: > 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. > ^ That. I've said the same thing multiple times already. Cheers, Andrey.