Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85190 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25397 invoked from network); 18 Mar 2015 13:02:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Mar 2015 13:02:50 -0000 Authentication-Results: pb1.pair.com header.from=inefedor@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=inefedor@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.179 as permitted sender) X-PHP-List-Original-Sender: inefedor@gmail.com X-Host-Fingerprint: 209.85.214.179 mail-ob0-f179.google.com Received: from [209.85.214.179] ([209.85.214.179:36799] helo=mail-ob0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/A6-22462-87779055 for ; Wed, 18 Mar 2015 08:02:50 -0500 Received: by obdfc2 with SMTP id fc2so31033185obd.3 for ; Wed, 18 Mar 2015 06:02:46 -0700 (PDT) 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=UI3Bo8HDUl07tgz6c+BK62ZSPM/+L3hPd/5is8YkYYo=; b=Tr9HtbFjpx6oteyB1mEnRiG0Xt1las6XAIYpvnel9cGEDc8S3ry2ZGj/dZcNf3OGTD 6AqD2OJQ17c/jr/vhyc5RNomR2V9Vqkwh7lFmgNP856/Va+BDSH9UZuLJ2j4Lp41e345 IKhGKmgYT3Y2chaHrmwglBmusUf484kehTvSsakh3UrDpIer72W6a6LHY+Djo5EkxtUY Cs2OF7f/DdVw6f7U8Y93vH8JlWUBMDrGTe3zz10/k+k0izPvSpBLVtm0B5PCKfudLj5o BizjrG4u6EXd/229/ywAYZYu9cyfkk8UUeRdGvviLYlfm/+rFxLwcaKvlmI24hIjFyG0 fSqA== MIME-Version: 1.0 X-Received: by 10.202.98.197 with SMTP id w188mr53705822oib.6.1426683765828; Wed, 18 Mar 2015 06:02:45 -0700 (PDT) Received: by 10.202.78.5 with HTTP; Wed, 18 Mar 2015 06:02:45 -0700 (PDT) Received: by 10.202.78.5 with HTTP; Wed, 18 Mar 2015 06:02:45 -0700 (PDT) In-Reply-To: References: Date: Wed, 18 Mar 2015 17:02:45 +0400 Message-ID: To: =?UTF-8?Q?Pavel_Kou=C5=99il?= Cc: PHP internals Content-Type: multipart/alternative; boundary=001a113d2bde11b40505118fb32b Subject: Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5 From: inefedor@gmail.com (Nikita Nefedov) --001a113d2bde11b40505118fb32b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 18 Mar 2015 15:52, "Pavel Kou=C5=99il" wrote: > > Hello, > > I made that conclusion because in the first example, the library kinda > forces strict mode rules on the caller, even if he doesn't want to use > strict mode - this makes the interoperability of the two modes > problematic. This is incorrect, library force itself to use right types, not you. I don't see any problems here. The only thing that for sure lacks in PHP and that would make STH better is callable signature types. > Also, the other possible outcome of the scenario (respecting the mode > of the place where the callback is declared), is IMHO problematic as > well, because it does not respect the strict mode of the place where > it is called, making it inconsistent with how the dual mode RFC works > in general. It doesn't matter where the callback or function was declared, it only matters where it was called. It pretty much is consistent. --001a113d2bde11b40505118fb32b--