Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101592 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85081 invoked from network); 10 Jan 2018 19:00:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2018 19:00:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 74.125.82.195 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 74.125.82.195 mail-ot0-f195.google.com Received: from [74.125.82.195] ([74.125.82.195:43600] helo=mail-ot0-f195.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/18-39025-8C2665A5 for ; Wed, 10 Jan 2018 14:00:25 -0500 Received: by mail-ot0-f195.google.com with SMTP id t28so1972oti.10 for ; Wed, 10 Jan 2018 11:00:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lerdorf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LjmC671luf4LeV1VNA7HPvdI/euIBEJ+nFbC2UVM/I0=; b=MgDAjqJq0qfsS3CUq7MUv39EIi+GrSQdh9uI6vzjxBs8mqwrJHn00lHrIKrFFyRoCJ dW5ahSQXIPsgS+7Dtzhuly1kul8DiKRGev40oO7rPxf25kE8r3xrKKITLi5Cr3z2p0GE +1JUeYOulTZcLZe8d/zGcco4CKS7ssrM9BOZDUsPceTODONbVvL5ZirCS+AhUdf2dVbL oiYAAPlSpKJehxcgAU/wEhPUbACqw7RLQyJm/LNqSo+IfdkA/V6ahNVfE4xXEQFzDv0Y /tZw3N3l+men8wgEiG3x7dSCicvCpeRugxV4DiNcXETqG9ClpPMUqy4n15Kna5ueOPie oXlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LjmC671luf4LeV1VNA7HPvdI/euIBEJ+nFbC2UVM/I0=; b=YIm6X670owqFk31FhdbCz6Yh1QwTk8Ox0BcxbVXI437b1ZO8liFESmOcEhkW7mCUrA PCPLsMujImdd0Rtsxwec3M0r0xYcZp8V7rVQXwPwDYFvS3rj2WLlq40XA6sPtIfswS4R /iSKDzZlOrGGN1pb9whjZKNozLJbum7vFoMOd1+3j84PBk2znKCDFvwJRztyxS+pHU4M wze8htQEYd7P41uRyuIOnrAX6X+ELa/rlUKJP38kRO4Vf0D+8NwN8AN1FIwmoQ0DHUzn B1IyD95pxS1qfr2v6BzMv2Ge6JvA+EfHMYpp167OuapQgjbBuYZ+A11PsNTtCyM87Qa7 6z9A== X-Gm-Message-State: AKwxytf+oaL/wClRvbSbABuvAzub+b/1/FsiJdO260BIKM7HDTTlsvyT 1HyOQKMDYaYgAw97+vRK/epTi70Z8XUk/YNkZ9+SYA== X-Google-Smtp-Source: ACJfBos6i9wjy180efgQnLr6C2K8B8DGUcBm0I90qJXSctRKE8eGWNL0+XQgND2pK8tx4IHINqkBHxSA0elXgZWBBdg= X-Received: by 10.157.15.33 with SMTP id 30mr8255422ott.150.1515610821792; Wed, 10 Jan 2018 11:00:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.121.200 with HTTP; Wed, 10 Jan 2018 10:59:41 -0800 (PST) In-Reply-To: References: <9a3a8760-f65a-a5c0-b318-1830a9a986c3@gmail.com> <9352F6DF-9940-49A2-9B1D-FA9258E9738E@lerdorf.com> Date: Wed, 10 Jan 2018 10:59:41 -0800 Message-ID: To: Michael Morris Cc: PHP internals Content-Type: multipart/alternative; boundary="94eb2c11040ea6ac78056270a48a" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Strong Typing Syntax From: rasmus@lerdorf.com (Rasmus Lerdorf) --94eb2c11040ea6ac78056270a48a Content-Type: text/plain; charset="UTF-8" On Wed, Jan 10, 2018 at 10:48 AM, Michael Morris wrote: > On Wed, Jan 10, 2018 at 12:27 PM, Rasmus Lerdorf > wrote: > > > If you stay away from trying to change a 25-year old loosely typed > > language into a strictly typed one, then the RFC becomes much simpler. > > > > -Rasmus > > > > I have REPEATEDLY stated that is not the goal. I don't misrepresent what > you say, please do not do that to me. > > I want to see strict typing as an option, not a requirement. > But the point is that whether it is an option or not, it still has to touch the zval. Which means everything changes whether the option is enabled or not. If you store this information elsewhere, that other location has to be checked on every zval access. Basically the work is identical to the work required to make PHP strictly typed. Making it optional might actually be harder because we have to build both and add more checks in that case. The only viable place I see to store this optionally is outside the runtime in a static analyzer like Phan (which already does this) which matches how HHVM solved it. Of course, there may be a cleaner way to do it. But that is why an RFC on this topic has to give a clear plan towards this cleaner implementation. Now if the RFC was a plan for baking a compile-time static analysis engine into PHP itself, that would be interesting. But that is a *massive* project. -Rasmus --94eb2c11040ea6ac78056270a48a--