Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80546 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91322 invoked from network); 15 Jan 2015 15:11:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 15:11:34 -0000 Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:61468] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/FC-14306-4A8D7B45 for ; Thu, 15 Jan 2015 10:11:33 -0500 Received: by mail-wi0-f174.google.com with SMTP id h11so35797705wiw.1 for ; Thu, 15 Jan 2015 07:11:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=BsuKpQZF82E+gFuHazNeGjPWB4IBgxoyEcSoANZPiKo=; b=HC8qw35ZbYpvYGd31aGRGk34HTAD+DE/XCzFGKXsP9QSI9FPLX5x3UOM8dXvwLqq+0 llyvo3hPJyT0DCaXdMGi2pRj+YO7HAUScvNgJCINeibPcLFW7vSQHwTYjWw1IFl7LLnk ORfMyI8Bj+NbE1+vcFtCqiBFFjLKkQBJEcBkiXt2NUdtd7+gEISG79+gQJn2NVDtzuhZ 8GFpq2BZoyQVBvPWEHdx2VwiCdBORLOjg2Oc679wwi2gwSukHFsNhvV6jIMhdsLiu7Lt OYVf9sdLy2ziUlrMK5N+A+TPQpcN4NBukJ6wW1RjpVc2Di+iyCIQPWcKubKpsAd8VpMK H79Q== X-Gm-Message-State: ALoCoQnUkLgu6a8r/0LbZsJb9tvdTP5IvIq9GrLEsdqt43l8mq+Cn4lANwpBkVHkbMa5BCHn6NwE X-Received: by 10.180.221.201 with SMTP id qg9mr26019141wic.29.1421334689109; Thu, 15 Jan 2015 07:11:29 -0800 (PST) Received: from [192.168.1.66] (83.90.199.146.dyn.plus.net. [146.199.90.83]) by mx.google.com with ESMTPSA id ei5sm23147785wid.2.2015.01.15.07.11.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 07:11:27 -0800 (PST) Message-ID: <54B7D8AE.5090209@seld.be> Date: Thu, 15 Jan 2015 15:11:42 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: internals@lists.php.net References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> In-Reply-To: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: j.boggiano@seld.be (Jordi Boggiano) On 14/01/2015 00:16, Andrea Faulds wrote: > Here: https://wiki.php.net/rfc/scalar_type_hints > > This is a new thread because I’ve made a significant revision to the RFC, so it’d be sensible to separate discussion of the updated RFC from the v0.1 RFC. Reading the thread at this point shows so much confusion, it seems half the people reading the spec misunderstood that the declare() line affects function calls only and not the API/implementation level. As much I think it was a smart idea and workaround, it is perhaps too clever for its own good if nobody gets it. Anyway, as v0.2 appears to be v0.1 + declare(), why not keep those two options separated in the vote? a) should be add weak typing b) should we also add declare() for to get strict typing at call-site. If *a* passes it would be a great stepping stone towards adding *b* later perhaps, or tweaking internal coercion rules to improve the behavior of the weak types, having scalars in return hints (since return hints seem likely to pass), etc. If *b* passes as well great we have a complete picture and every team can have declare() Y/N in their own coding guidelines based on preference. Cheers -- Jordi Boggiano @seldaek - http://nelm.io/jordi