Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83178 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2859 invoked from network); 19 Feb 2015 13:01:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2015 13:01:57 -0000 Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.180 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.217.180 mail-lb0-f180.google.com Received: from [209.85.217.180] ([209.85.217.180:38924] helo=mail-lb0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/03-18870-3CED5E45 for ; Thu, 19 Feb 2015 08:01:56 -0500 Received: by lbvn10 with SMTP id n10so7320456lbv.6 for ; Thu, 19 Feb 2015 05:01: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; bh=GELGjokGNUWC+KMiOofhFlgfZuKWRpWwjsdtyQMGHcY=; b=yGgwluv5t/54+IHIBj5FNX88UXpVc8on+uLnvPud04BXp6leNGxS9onLHSVWwbte+r l889f4+yfCEXg3btlkd4inYPvcJdCb7IL/jUr4WudHKDv4z0eOLcJECyLNIEYOwXvyBl zEOh0HsdEvmHzXEhumADeb7rsVQwVUStUaAd+4DJNAsVO5akQSDI9l1iuJXTM7mhx3jw 7EBDSYL7AyntWjHAlG8toKwUR/RUfdyIdS6GktcoffEn4wspb520lnvoY7jeA/rBRw/N ZPoAHfPmEdfEhWEIsPk/TE2wZ973YOyUcPs3TxLW4+UDjEmppHzxb0izoJZWiK3miFFf UFDA== MIME-Version: 1.0 X-Received: by 10.112.92.204 with SMTP id co12mr3793642lbb.43.1424350912858; Thu, 19 Feb 2015 05:01:52 -0800 (PST) Received: by 10.25.43.9 with HTTP; Thu, 19 Feb 2015 05:01:52 -0800 (PST) In-Reply-To: <54E56A23.9060305@birkholz.biz> References: <54E564E0.4040901@birkholz.biz> <54E56A23.9060305@birkholz.biz> Date: Thu, 19 Feb 2015 08:01:52 -0500 Message-ID: To: Dennis Birkholz Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC-Discuss] Scalar Type Declarations v0.5 From: ircmaxell@gmail.com (Anthony Ferrara) Dennis, > Will you consider to let the people vote on how to enable strict mode > like discussed in the v0.4 discussion? Like this here from the "Reviving > scalar type hints" thread? I believe that RFCs should be opinionated. I dislike the recent trend around having a lot of voting options as it only complicates things for the voter. For this reason I have chosen what I think is technically the best option and went from there. I am definitely open to changing that, but it would need to be based on technical reasons and not just "popular preference". Heck, in a recent public poll, over 20% of respondents voted for it being an ini setting. I touched on the reasons in the RFC: https://wiki.php.net/rfc/scalar_type_hints_v5#why_not_use_use_strict_instead_of_declare But let me go through them one-by-one: > Am 17.02.2015 um 00:58 schrieb Sara Golemon:> Straw poll: >> 1) . Is that setting strict mode for a file and outputting 4? Or is it outputting the constant "strict"? Sure, this could be "solved" with a rule that it could only follow > 2) > 3) use strict; (psuedo-namespace) Re-using namespaces to effect runtime is weird. Not to mention what's the expected behavior of block mode: is bar() called in strict mode? Or in non-strict mode? >> 4) > 5) declare(strict=true); (As a top-level declare only) >> 6) declare(strict=true); (exactly as in v0.3 -- maybe you liked it) Which had a number of people against it, with arguments about the odd behavior of declare in blocks, etc. >> 7) your write-in vote here The only other one I've seen that *might* make sense is using a strict qualifier on the namespace declaration: strict namespace Foo { } IMO this has the same issues as use strict above. However, it also seems to imply that the namespace is strict, where it's only the declarations in the file that are. I'm 100% open to technical arguments and justification to switch to another syntax. I don't believe that it should be a poll though. That's why I made a decision and backed it up. If anyone has logical arguments or disagrees, let's discuss it. That way the proposal can be improved through collaboration rather than just a blind vote. Thanks for the feedback!!! Anthony