Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81882 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10212 invoked from network); 5 Feb 2015 08:59:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 08:59:35 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.42 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.42 mail-pa0-f42.google.com Received: from [209.85.220.42] ([209.85.220.42:52571] helo=mail-pa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/6A-51979-7F033D45 for ; Thu, 05 Feb 2015 03:59:35 -0500 Received: by mail-pa0-f42.google.com with SMTP id bj1so8822019pad.1 for ; Thu, 05 Feb 2015 00:59:32 -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:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=6eG9m13WTURqeew0NBZnO2OTvUJQ6DKsscRXBCD4hws=; b=DWKTCP1Jhc3pkjMub2ZJhFtofDtNAnth3oguLYHD9/PXTuqIp6sYD78bvVFCjakyXO m3Z+suLcHMub+vnJ9rh5hU+K/UxdTlOZVBJDhzS/Yf+1QFvKGMyiLqtzlOLSsTB1K/tz qf3bAw+XUgKzak3J+GWVn0wdwCgr7GYSfQdiUAhdS+MsZ3khKNcjNJKSN2tEMueh/QB3 7Ba3BPpt3GcYVAY9wF3Azsu8G1LA28lRsmjFvrXqMOU/zA4ugfesYjhnbm27hYF1Obc3 sMf1Bu3rjBtAa6rDsN6TFnNwcpuaK2OXbJqlAVxalK+TaRDfXZRM5ZzgB8DY4ZE7JLQd dIDQ== X-Received: by 10.70.47.231 with SMTP id g7mr3871833pdn.75.1423126772855; Thu, 05 Feb 2015 00:59:32 -0800 (PST) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id g6sm4353247pdo.76.2015.02.05.00.59.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 00:59:32 -0800 (PST) Message-ID: <54D330E7.9090100@gmail.com> Date: Thu, 05 Feb 2015 00:59:19 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Pierre Joye CC: Andrey Andreev , Sebastian Bergmann , "internals@lists.php.net" References: <00c101d04049$ca411ec0$5ec35c40$@tekwire.net> <54D1CA7C.8060204@php.net> <54D1E6EC.7060702@php.net> <54D2B3FA.6020900@gmail.com> <54D2C018.6050803@gmail.com> <54D31A25.3040905@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] What do we need strict scalar type hints for? From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > However I feel like the fact that it only affects your app (even if > you use a library relying on strictness) if you want to is not clear > for everyone replying here. Is this point clear for you? I was addressing the idea that every scalar type mention should be strict. If it is a choice, I am more open to it, even though I think declare is a very ugly way of doing it. I'd rather have foo(scalar $bar) for traditional (coercive) scalar typing, and something like foo(scalar! $bar) (you can bikeshed the syntax if you like) for strict typing. It is immediately clear what each one does, does not conflict with PHP tradition, and allows to freely choose and intermix strictness levels as one's hear desires. -- Stas Malyshev smalyshev@gmail.com