Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81627 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6740 invoked from network); 2 Feb 2015 18:55:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2015 18:55:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.172 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.172 mail-vc0-f172.google.com Received: from [209.85.220.172] ([209.85.220.172:59483] helo=mail-vc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/1F-34915-F18CFC45 for ; Mon, 02 Feb 2015 13:55:27 -0500 Received: by mail-vc0-f172.google.com with SMTP id le20so15307087vcb.3 for ; Mon, 02 Feb 2015 10:55:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=igeAlFStWe1sz60OvoQUB7ijBm+xVaGmhmObqccoSkU=; b=aIXvcF8bvnJNwXl2mC048UIUEM9X6NG+pIOZqSlLS3+q9zUVSNCxnN8hhu/vqpPwo/ v5jHGgvp0tpUeBST3lkjerg7hhSklHxDmBI8220c76kP8LA5rtvoY087vzdg9Rzxa4Gk X5f3SPwDOqsbnnLRrfhixo58Lrf7SOv9aVwBLIxNeguPlgiTLs9xz734cNXxTrjvX8TT vYShgVTddvbb29u/7NVAV/w/CVjpZVIP7pNo6I7WPf2UK2KHQmfnQxX4Ki+cxDIUZYna W2JLZ0+ctduLFmNbYQkTNRhcBWNSYbGwq6vSrA83ukjZcM2BXTS0cUOWIGnos6LGB/nz 0PpQ== X-Gm-Message-State: ALoCoQl5TQINSfbWVSqLvXG73bgyMmM7mND4nOPe4Breobtu3t4Js7VHDVhW8c65wiaXA4TWly0gA5uGb3/lsBOwjs4+NIQR7sg2OjfVD3YbyDoRZzEYy8/JLiRH40KmdRYWKXSfyWmO9RSr1FlEq0VFCiSqu1K3lw== MIME-Version: 1.0 X-Received: by 10.220.185.193 with SMTP id cp1mr13362166vcb.80.1422903325008; Mon, 02 Feb 2015 10:55:25 -0800 (PST) Received: by 10.52.74.73 with HTTP; Mon, 2 Feb 2015 10:55:24 -0800 (PST) In-Reply-To: References: Date: Mon, 2 Feb 2015 22:55:24 +0400 Message-ID: To: Pierre Joye Cc: PHP Internals , Andrea Faulds , Nikita Popov Content-Type: multipart/alternative; boundary=089e015386103cbedf050e1f7f08 Subject: Re: [PHP-DEV] What do we need strict scalar type hints for? From: dmitry@zend.com (Dmitry Stogov) --089e015386103cbedf050e1f7f08 Content-Type: text/plain; charset=UTF-8 On Mon, Feb 2, 2015 at 9:05 PM, Pierre Joye wrote: > hi, > > On Mon, Feb 2, 2015 at 4:12 PM, Dmitry Stogov wrote: > > hi, > > > > could you please write down few use cases, when strict scalar type hints > > are really useful. > > I think there is one big misunderstanding in Andrea's RFC. > > Strictness is local only. Or to say it in a better way, only the > maintainers of a given library will bother with it. Actually, not. The proposal makes declare() work on caller side. So, each usage of a library function in user code may be wrapped with declare() or not. Thanks. Dmitry. > Users of this > library do not, there will be no change there from what we had in the > 1st rfc. Or they can if they want. > > Keeping that in mind, the declare statement, as ugly as it may look, > could be actually a killer to finally get what both camps want but > never (and never will) manage to agree. > > -- > Pierre > > @pierrejoye | http://www.libgd.org > --089e015386103cbedf050e1f7f08--