Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83252 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56417 invoked from network); 20 Feb 2015 00:23:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 00:23:57 -0000 Authentication-Results: pb1.pair.com header.from=padraic.brady@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=padraic.brady@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.175 as permitted sender) X-PHP-List-Original-Sender: padraic.brady@gmail.com X-Host-Fingerprint: 209.85.160.175 mail-yk0-f175.google.com Received: from [209.85.160.175] ([209.85.160.175:46718] helo=mail-yk0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/80-52763-C9E76E45 for ; Thu, 19 Feb 2015 19:23:56 -0500 Received: by mail-yk0-f175.google.com with SMTP id q200so5634916ykb.6 for ; Thu, 19 Feb 2015 16:23:53 -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:content-transfer-encoding; bh=17mvcGqMZO7emy4//Onb56M2OZ5xh5wCsTly3y1cGgM=; b=OG5i+lVDrLziR1UY0qC9us4dRZBMRcOq8Yklq9pbjlKHFVSpUhQBtr8CN88u+WIOmi BKJIVtQd7sOBFwa0M62iTAB3hGM/CDt1RWOPx7JNDaO5uoaqg57EnZdgvBg20vhe3aVU Z8He261H8sWr5lJzOmB4jdZWvmlT8aer6Ydj7qplGmO/xAhlo3ib25ay1IKe7ozlOoCV aQWYRrJ+JBhZP3yJwZUNhSeanvLGtklCNmDAzXhfPFyyxufjzuUXyAWAtJ/bcDhHKs3N m/OjuKAykV9cpF3u+dXXNgXc6t7G0REbx6P3vRlLC2GYPoPV+uFCccFPh8JgFvXt13GL MlUw== MIME-Version: 1.0 X-Received: by 10.170.54.84 with SMTP id 81mr5520153ykw.84.1424391833711; Thu, 19 Feb 2015 16:23:53 -0800 (PST) Received: by 10.170.222.86 with HTTP; Thu, 19 Feb 2015 16:23:53 -0800 (PST) In-Reply-To: References: Date: Fri, 20 Feb 2015 00:23:53 +0000 Message-ID: To: Anthony Ferrara Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [RFC-Discuss] Scalar Type Declarations v0.5 From: padraic.brady@gmail.com (=?UTF-8?Q?P=C3=A1draic_Brady?=) On 19 February 2015 at 23:07, Anthony Ferrara wrote: > All, > > An interesting point was brought up related to block mode: > https://twitter.com/drrotmos/status/568540722586107904 > > Namely that generated file caches may need the ability to switch block > mode on-and-off. > > I'm considering making the change to add that. If that happens, > declare must be the outermost block, and no non-declare blocks would > be allowed in the outermost scope of the file: > > declare(strict_types=3D1) { > //... > } > declare(strict_types=3D0) { > //... > } > > Having trailing code or code outside of the declare would be a compile er= ror. > > declare(strict_types=3D1) { > //... > } > foo(); // compile error > > This behaves consistent with namespace block-mode today (though the > strict type declaration would be required to be outside the namespace > block). > > I'm considering adding it, as it's a valid use-case. What do you think? Seems a valid use case, and the block solution is therefore the logical step. I see no reason to exclude it. Paddy -- P=C3=A1draic Brady http://blog.astrumfutura.com http://www.survivethedeepend.com