Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83016 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 746 invoked from network); 18 Feb 2015 00:58:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 00:58:28 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.217.172 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.217.172 mail-lb0-f172.google.com Received: from [209.85.217.172] ([209.85.217.172:35284] helo=mail-lb0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/D6-34644-2B3E3E45 for ; Tue, 17 Feb 2015 19:58:27 -0500 Received: by lbjb6 with SMTP id b6so7829089lbj.2 for ; Tue, 17 Feb 2015 16:58:24 -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:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=HOdizF+bt5H9CCi6DJMXIRegvmrjdwLsjEY15ueSopo=; b=TWSTvKLWdenDczcY6PCb2v9ATjOA3K31awJJvOcxtn/toJ7SlFUdmTYJ/rX90PDTSv XAyc2/SRzVKKqrW1bA9XMHQS90FfEe2ff70+NY/K0HgtGtKvpk96b5Qci9leWlWzp6LW EAiqRruRSB6bwLVRMVjxyUSh1SXvnhXTMWiXjxNws0IcBikmxiMLFIzQMN/b3NR9JvWM +zDDUA2F+QJvtrxe9u7IykjtOpd5RE7yFpbPED1oKG/pQLbUw26n4qkLOyjFVsr10xT6 D4CwfqKqS/vS6zm+JDvjN/a90ynoagI+O6s+MMBely11Z8E8uZUTzyl5d8oPmjv7epUv FEMw== X-Gm-Message-State: ALoCoQldnXqrOnCguVFeJfskUYUaNBR/Th+SYi/qoXRlS6xJw6TE+bROm3wH+NsrYIelsE17P0Eb MIME-Version: 1.0 X-Received: by 10.112.36.69 with SMTP id o5mr1109095lbj.59.1424221104050; Tue, 17 Feb 2015 16:58:24 -0800 (PST) Sender: php@golemon.com Received: by 10.112.38.73 with HTTP; Tue, 17 Feb 2015 16:58:23 -0800 (PST) X-Originating-IP: [2620:10d:c082:1003:22c9:d0ff:fe87:295b] In-Reply-To: References: Date: Tue, 17 Feb 2015 16:58:23 -0800 X-Google-Sender-Auth: _ozBsNNYu0I2fgP4oD0jgWXTACI Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Scalar Type Hints v0.4 From: pollita@php.net (Sara Golemon) On Tue, Feb 17, 2015 at 4:35 PM, Nikita Popov wrote: > I don't like the way this is heading with regards to internal functions. > Apart from better inter-compatibility, the primary appeal of Andrea's > proposal was that we have the option to make not only userland function > calls strict, but internal ones as well. With these modifications this is > lost for all practical purposes. (*) > Personally, I agree with you. I liked Andrea's proposal a lot, and if we put this back up for vote it probably would pass the 2/3rd majority needed. That said, if we can build a better consensus, we should try to. > I don't buy into Rasmus arguments about internal functions. They concern one > particular edge case (int->float coercion) and I doubt they have much > relevance if applied to codebases with pervasive use of typehints (where you > can be reasonably sure of the types of your variables). Even if, for the > sake of argument, we acknowledge the concern as valid we should be > discussing that particular case (int->float coercion) rather than dropping > the strict typing for internal functions altogether. > I don't fully buy into it either, particularly if we apply meta-types/unions. I do have to acknowledge his point about "encouraging the use of blind casts" though. Having a mass of PHP standard library functions suddenly look typed or apply a different set of coercion rules than one is used to is potentially dangerous. -Sara