Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82269 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25444 invoked from network); 9 Feb 2015 11:20:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2015 11:20:19 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:36513] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/0F-50460-3F798D45 for ; Mon, 09 Feb 2015 06:20:19 -0500 Received: by mail-wi0-f176.google.com with SMTP id hm9so5286316wib.3 for ; Mon, 09 Feb 2015 03:20:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=yArr7/GEUDWf/DMOEqcIhfJ8YyPI+d8L7IA3VJdPNik=; b=XgoSJhass8d2ZsRfcBt9rEclsa2opoSrHEC4SfmmfFYzvdAGbqGECudoyeom/ZgyH+ /XwIOeJWHg0uf1tqqukHoJU30kpetbBDz41QqhAuw7QAWhn2LQves0XYFzpRU0b8RPni pSRI/qjy+Dcb1kcjUdI8HPbAo927/4Z4DfoRjUZqIOhB65MqnkpmG9HQpEnQCBL7inqK 8lfgFNFiC/BojquKkRRTk0JK0whXCbbSLBwSWbV+ZOJP/FpKr84K5Vm70wVHRealyM+e VhS1HGyNdxySpod6FWDp9UBiqPnr5GBqyPkjuUFgTpi4QNht2rxcL4dQmufJwe0oNQva mUvg== X-Received: by 10.180.9.115 with SMTP id y19mr34462191wia.32.1423480816801; Mon, 09 Feb 2015 03:20:16 -0800 (PST) Received: from [192.168.0.172] ([62.189.198.114]) by mx.google.com with ESMTPSA id pr9sm15943444wjc.4.2015.02.09.03.20.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Feb 2015 03:20:16 -0800 (PST) Message-ID: <54D897D4.5040304@gmail.com> Date: Mon, 09 Feb 2015 11:19:48 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> <54D7EF9D.7040700@gmail.com> <5E3D1500-E55D-4FEB-978B-FCA4AE4A1F13@ajf.me> In-Reply-To: <5E3D1500-E55D-4FEB-978B-FCA4AE4A1F13@ajf.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Syntactical change to Scalar Type Hints RFC From: rowan.collins@gmail.com (Rowan Collins) Andrea Faulds wrote on 09/02/2015 00:05: >> If you're going to go that far, why not just disallow the block-level syntax of declare() for this case, if that is the complaint? Or if the problem is the non-block syntax, why not enforce that a non-block declare(strict_types) be at the top of the file? > Well, it’s not just that which is the problem: declare() is rather verbose and ugly. Also, having it behave differently from all other declare() statements would bring into question why we even bother reusing the declare() syntax. Thinking about it, declare(encoding) already disallows scope anyway, so we wouldn't even be introducing something new: "Fatal error: Encoding declaration pragma must be the very first statement in the script".