Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107726 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 70996 invoked from network); 29 Oct 2019 21:16:32 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 29 Oct 2019 21:16:32 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id E21202D1FC9 for ; Tue, 29 Oct 2019 12:04:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-yw1-xc2d.google.com (mail-yw1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Tue, 29 Oct 2019 12:04:15 -0700 (PDT) Received: by mail-yw1-xc2d.google.com with SMTP id d5so5467426ywk.9 for ; Tue, 29 Oct 2019 12:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=gnc6KAEaRl6EouMb45jD4nev9kkMBlr5fYWkDwRQDjE=; b=WZ91Ecjf9Z52DD+WJotdmm6fnYVjB2LDI3iVx8axRSrBJxtVR9/tpUpFJl8hrEKpxw 2tG27lTSEX11963DDCWNseJHRuIbc1yK3R+wN7uAwThbskuhgaXapWes0CcnJKdURfmw VU0gY3wNoH9JxRUtj1i2B6YbQAUfNB3/ZzCHRShIwFEjioH2RqKo7APmXsvHoKGs6mbF HS4UP28yp0Ttlj97Pd67iD4y5mkUT/nQ+JAWIU5177q2U4ekbl0LDbkLwAZE3HXET3dD +5x+nzL8n/gNX7K3rPHxZbgzlMhLHqt1zCfOg3PzqxS1gBV/EdE7xp/WwN0050wD1WZF jQuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=gnc6KAEaRl6EouMb45jD4nev9kkMBlr5fYWkDwRQDjE=; b=bkJ71FdO1zKjPJug3qTTgSaS6IjBNdjaRprmhAeOzNp/OSIUtnoFngntucOUCnRMbG T1tEXhikTww/d95uiFvdgtBIE/An1pkZ5WN1lVxq5US7S/e96ACQ8+bwJNX66cBexJ1r bmYLhG9KK2YseKj5SCege1fM2FWeHW6ioqhuxknW5bQANxqxvST7/MkEJbXHNFuesDf5 TrSMN5Sf5mv4BZfDBtgBSmVa+SP5jCPg1TcXzca6c5ifVoAyxqCmbH2pMapshnGSdcw9 +9ja3m7z8MrAG4AJYgeDrl3G4ZAFrtAKUv2/FJECGqQIat4sH0l/JPHwWn9rUzfI2zVS UEQA== X-Gm-Message-State: APjAAAWbGucv8vG5dAEqdZ9sWNqyGb/CDD6cz5XVs1JMyw9/Mydbd/Ii 3D8y3YFRK2+pPvtXtyxYTUp7HA== X-Google-Smtp-Source: APXvYqzfmdScbY/SRS1c92Qlu74/Ng3eG9yodvk9cCx7dr8TpdXBCdfdutOvF/F5iOCThkOqVFjviA== X-Received: by 2002:a0d:e116:: with SMTP id k22mr13827903ywe.149.1572375854777; Tue, 29 Oct 2019 12:04:14 -0700 (PDT) Received: from ?IPv6:2601:c0:c680:5cc0:162:d071:9527:1b11? ([2601:c0:c680:5cc0:162:d071:9527:1b11]) by smtp.gmail.com with ESMTPSA id h65sm5575261ywa.62.2019.10.29.12.04.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2019 12:04:13 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_CF71E31A-017C-4CF3-A482-0CA54DAF6A47" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Tue, 29 Oct 2019 15:04:12 -0400 In-Reply-To: Cc: PHP internals To: Rowan Tommins References: <9d3f9895-5ab6-1d75-4eb2-0ba93f13a8fe@gmail.com> <9D2698F0-49A4-4EA0-BEEE-552D28BE995A@newclarity.net> X-Mailer: Apple Mail (2.3445.104.11) X-Envelope-From: Subject: Re: [PHP-DEV] Optional pre-compiler for PHP8? From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_CF71E31A-017C-4CF3-A482-0CA54DAF6A47 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 28, 2019, at 6:00 AM, Rowan Tommins = wrote: >=20 > Current tools tend to actually work on a directory level, because you = don't > actually know what namespaces are involved until after you've loaded = it, > and a file can include code for two completely separate namespaces. My > thinking was that a package would pre-define the full list of files = that > define it, with no auto-loader, and no conditional definitions = evaluated at > run-time. As Benjamin points out, this is closely related to = preloading. I would rather a tool that did not require specifying the files. I = personally would be fine with one that used a directory as the = demarcator, and even if it only worked when you put your namespace in = another directory it won't work. > And what if you want simplicity *and* performance? Most of the things > people want to make strict about the language don't make it faster, so = if > we limited "pre-compiled mode" to be strict, we'd be making a = deliberate > choice to group objectively good things (fast vs slow) with subjective > preferences (strict vs simple). That pretty clearly marks strict mode = as > "the better way". At the risk of being too flippant, I defer to the wisdom on that great = philosopher Mick Jagger and say you can't always get what you want... But seriously, at some point tradeoffs have to be made to see any = forward progress. What we have not found before was a good tradeoff = between strict and BC. Maybe this it is? After all, while not all strict = things are about performance but many things that enable performance are = strict. > That sounds like the worst kind of fork: two different engines, = running two > different dialects of the language. At that point, you might as well = just > switch to Hack. That feels like an over-reaction. Hack has purposely diverged from PHP = and requires a different runtime than PHP. =20 The idea I was proposing is that the PHP runtime be one but operates in = two different modes =E2=80=94 one mode per "engine" =E2=80=94 and the = goal of two different modes would to be to stay more similar than = different, but allow one of them to have BC breaks. > Note that this was exactly what "P++" was intended to avoid - the two > dialects would exist in the same engine, and get the same performance = and > security enhancements. It could also be one engine, it just seemed like that coupling would be = more problematic than separating them. That said, I'm not skilled enough in PHP internals to implement it = (yet?) so I can only speak to it at a high level. >> The advantage would be two-fold: >>=20 >> 1. Backward compatibility >>=20 >> 2. Allowing PHP to continue to meet the needs of new/less-skilled >> programmers and/or people who want a more productive language for = smaller >> projects that do not need or want all the enterprisey type-safe = features. >=20 > Both of these are reasons to have some sort of "strict mode", but not = for > tying it to some other feature. I don't understand your reply, but maybe it is moot considering the rest = of the dialog? What we have today is a rock vs a hard-place, and no one wants to give = even a millimeter. So, if this is not a viable solution in your mind to break the logjam = between BC and the desire for strictness-in-all-the-things, do you have = an alternate, better proposal? -Mike --Apple-Mail=_CF71E31A-017C-4CF3-A482-0CA54DAF6A47--