Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91696 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8835 invoked from network); 16 Mar 2016 17:23:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2016 17:23:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=pjsturgeon@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pjsturgeon@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.175 as permitted sender) X-PHP-List-Original-Sender: pjsturgeon@gmail.com X-Host-Fingerprint: 209.85.217.175 mail-lb0-f175.google.com Received: from [209.85.217.175] ([209.85.217.175:32844] helo=mail-lb0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/E7-48430-BA699E65 for ; Wed, 16 Mar 2016 12:23:55 -0500 Received: by mail-lb0-f175.google.com with SMTP id oe12so52698275lbc.0 for ; Wed, 16 Mar 2016 10:23:55 -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; bh=G6Le1FduQ7Axye8L4UNd5eIXtKuwXEkHWPwNK4F1OuE=; b=oOM3BiYf/Mbf7aPDZmPEm/CD3WaPhHTz6ACP4FbSldbyMKOqqgzRgqD9ovglZ85OoP hIe0NK4hcBs3d7DjDJc6DHOqy4VqP+v3VMo9AbxfY9GJMlDP/oKanya+lWsIK4mwYdJh +Af3+zPwReMS23syukk4temBNq/FH9TWI5/LThlfiMKAHYG2x9fWrnXlr0Z2dhPmiT97 CCdBMAdXpDP5O60fs58bUpjmLJ1HgpM0T3ipj4Mz7iUwnfNFxPCVJ7FtYXhHmDMsXMEh nQj644AK6OFvf8zqZNsnT6GhTU+aFpeQUNl23JG6bCJrANO2mB5ATcNHFI9MWbPcytlZ v4+Q== 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; bh=G6Le1FduQ7Axye8L4UNd5eIXtKuwXEkHWPwNK4F1OuE=; b=XN5t8k4z5J2l+a8QD4HeaW/78pWy/kSf2JmKB/oLxw74ia486RV8EwCJmofI12g0GF z+GdWfkmbHQma26SGqf377/5AHQL/vs41QX4LAr56LG+sg5uRgiozKDxD7mFRwveK41W VUmSKf+HmDPzkpzvF7Xw4aZoAE5z/gJ9XpiGbzT9XoHnpKyK7vpyJ0uh1R/NVjJ3UMZ+ 7XxQ6nszeiB5B8NmbBwjCwwrpDY1kxLe3R4ELJVpg1b9gectx5JvSJBzu259IJS0Kl1l fbuPITOEglCS7/wiEbNDn6ox5NcJQFS7UWsD/KI7NofeVjfJzSGnNLaCPd7mMlmt4/vJ Ph7A== X-Gm-Message-State: AD7BkJI0M5FWV6v6JQg75wI5LVQnr4I4u0EUUfqsChAetYfTb1HJT2SP3DQXizmxcKnAv+m5vtBRJp3T9WqgiA== MIME-Version: 1.0 X-Received: by 10.112.50.144 with SMTP id c16mr1889986lbo.128.1458149032676; Wed, 16 Mar 2016 10:23:52 -0700 (PDT) Received: by 10.114.78.71 with HTTP; Wed, 16 Mar 2016 10:23:52 -0700 (PDT) In-Reply-To: <1458146989.3472761.551077442.6C94612B@webmail.messagingengine.com> References: <1458146989.3472761.551077442.6C94612B@webmail.messagingengine.com> Date: Wed, 16 Mar 2016 13:23:52 -0400 Message-ID: To: Will Fitch Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC Discussion] Typed Properties From: pjsturgeon@gmail.com (Phil Sturgeon) On Wed, Mar 16, 2016 at 12:49 PM, Will Fitch wrote: > > > On Wed, Mar 16, 2016, at 11:36 AM, Phil Sturgeon wrote: >> Hello everyone, >> >> I have completed the draft for an RFC, to add Typed Properties. The >> patch has been written by the one and only Joe Watkins. >> >> https://wiki.php.net/rfc/typed-properties >> >> I would really appreciate constructive feedback on this RFC, with a >> few areas especially: >> >> 1. How scared are we that integers can be expanded to floats on runtime? > > First, this looks awesome, Phil! > > After reading through it, I think we can consult with function return > types: > > function blah() : int { > return 55.5; > } > > var_dump(blah()); > > Will return 55. It's a little different with properties, but what are > your thoughts on this runtime conversion? > Hey Will, Sure you'll see 55 in weak mode, but in strict mode you'll see 55.5. I don't really want to delve too much into how return types work in this RFC, because it doesn't feel entirely relevant.