Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93879 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83445 invoked from network); 10 Jun 2016 16:59:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2016 16:59:11 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.44 mail-wm0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:35031] helo=mail-wm0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/60-14797-ED1FA575 for ; Fri, 10 Jun 2016 12:59:10 -0400 Received: by mail-wm0-f44.google.com with SMTP id v199so554377wmv.0 for ; Fri, 10 Jun 2016 09:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=d51ROUKrmpFgfTz6J46Fc1c5/t22dIUNzkcvhrMZyy4=; b=VQZCNYTrl4wqYSSnjIXFFbRZZHQS6aAphB6nsSsiFqaeR+xDABft3hO09DiAxpnD+l JmcmK9CHB7B72swKsvOG314inWcOUF6JjZKMOAg/xfScrcEmOXn7D0Vo0OOXf59GN39x qZ1xXAewtrUb03uXsQ6s4JCQrplFKSKdHZE0g6ChW6nn+775zKyw02zfevOeXxUPAUNq FZm0i9RyPe9n1Flnd2Rh0mvVAN9hWAl/z1YNZumB5IWDrjCsLXEDD2fN2SnvMUZ7BAUw /Yh1LpWTb28iDheeFz4QKNO50mDrCcz/0jdFCHTVsOi+s/gGuJwVOVp3jyZDAZv6Z6FU v/IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=d51ROUKrmpFgfTz6J46Fc1c5/t22dIUNzkcvhrMZyy4=; b=nOjsUKbAU7Hjr6QHNDEljsoSv9kwWVfgu4C6VTs7Ed9/3F71JWDXGHsj8NC5rKee/W DKJxGnl+Cxn5f17aTS168fqggfUN2hUpl90cJKbHviNZPXKmpmeM7a1ZFlUndDg7yJsz Kb9mWHC4gcyQWEHWWRH9a1654aOFS+HfmeF5PR4rIfzC35FL4ut2r6j6iN3HTluJQ+oa 4TI0424VXB2DXwkNpchT2pEkHxEqSteXa7Bj8XUYlofPCU+eGkoiyiNqD50SlYmCPdxI vDFHQEiO89J7vEw+Pf+lb0oeuqy051pZASN6NYXZeZN7Cw+gEzbwv6Kd/z7kpgUH+7qx Va1w== X-Gm-Message-State: ALyK8tJoJ4/ZOMFMEiuawvPvRdh7dN8lVJHmwYCmcNt4vy1/TUXg34mn/em77wb6l1p2Cg== X-Received: by 10.194.221.37 with SMTP id qb5mr3007441wjc.171.1465577946915; Fri, 10 Jun 2016 09:59:06 -0700 (PDT) Received: from [192.168.0.98] ([93.188.182.58]) by smtp.gmail.com with ESMTPSA id v200sm61864wmv.4.2016.06.10.09.59.06 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2016 09:59:06 -0700 (PDT) To: internals@lists.php.net References: <2f0b0366-de16-25ef-f5ca-a03fb7d6f38b@zend.com> <575AE7EE.7050208@garfieldtech.com> Message-ID: <3246c813-95b4-a120-f1e1-9763edba0af8@gmail.com> Date: Fri, 10 Jun 2016 17:57:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <575AE7EE.7050208@garfieldtech.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: rowan.collins@gmail.com (Rowan Collins) On 10/06/2016 17:16, Larry Garfield wrote: > That seems like a worthwhile trade-off for a <1% performance difference > in a real-world application. The problem is that the performance hit is felt even for code that doesn't "opt in" to this feature. For an application that makes no use of the feature, it is all cost and no benefit. I think PHP is at a cross-roads, and (if you'll forgive the stretched analogy) at risk of going off-road and getting stuck in the mud. Option 1 is that the language remains inherently loose-typed, with a few entirely optional features to provide type safety in specific cases. If this is the aim, then the optional features should be as unobtrusive as possible for the "default" loose-typed approach. Any performance hit on untyped properties is a big deal under this interpretation. Option 2 is that the language embraces "gradual typing" as a core tenet of the language, with loose typing considered a "fallback". If this is the aim, then there should be a coherent roadmap of what the type system is going to look like. In this case, performance issues might be considered an inevitable cost of improving the language; they might also be reduced as the Engine is adapted to implement the roadmap. Option 1 seems more appealing, because it is easier to get agreement for, but if we keep piling on the special cases, we're going to end up with the worst of both worlds. I see the technical problems with creating a reference to a typed property as a sign of this: we are creating more of the frustrating inconsistencies that PHP is infamous for, because we're trying to have our cake and eat it. For the record, I'm not entirely sure which way I want the language to go, but I think it's a decision that needs to be made, and soon. Regards, -- Rowan Collins [IMSoP]