Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125294 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 860891A00BD for ; Mon, 26 Aug 2024 21:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724709542; bh=ZN1+IQpa09yQQz+iQuJ17xQLZYp9a5i2ndeUKIeqhh8=; h=Date:Subject:To:References:From:In-Reply-To:From; b=QZEvE1eiNVqpU9CdM9XGxOJoiztxcCHiAJ1EmfHwYbzA7eLJEFG7RJLNoGTEcHfVp YXMjCtf06XDQpgn9hQJGhHGwkPDfgEhIT7PT2jrfkIZ4RT4kkv6uEThWA9mH1l5iyV AhjWceGk3DdoeT3ibAiJOW/fafSBAoTdhNDo4DzmF8cZcnA4bamX2o21aMs559Bfxy gpy+xEF01WaqoZbb51Z4gT+sWU2yVBDHAuUCtbNZgemJJz81h2XI1vCjRDxp+bv4Os TKsLvHSrQ4vX8JRtv8nQq4uZFJgNyA9xp3IOcAZlfonM/bhOSKAwnI/3iwgHW+rF0z usToclhs2kWNw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 546CF180042 for ; Mon, 26 Aug 2024 21:59:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 26 Aug 2024 21:59:00 +0000 (UTC) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-371aa511609so2388460f8f.1 for ; Mon, 26 Aug 2024 14:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1724709427; x=1725314227; darn=lists.php.net; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=iXQk85Bz0uWFXImwDI236VG0AVPznx4BEpukyRyLnqU=; b=3Dlk6+S9Tz15edVG9HuvyZsd0ERsuwilKhEuxwN70zY1JjOVkAij8UVqTfVb64HIvA vvuMQ7YX6unR7aGfqi+9VSN0UhXJKTBj1rlV1+5z7IRmJ2ET4U3nQ92LQJwazuq7G2Qu 3An5n4RwIjHrJJmzpwvR88jc73Tks+eKv4AECwX731rlj36oRFmOMtIw0ak6sT4AEpfG WBkZChr2AC2ViTOKJ0TIH1eNpFrNryn0bF9ZkTLf602phnB0XsR7qf19jWqcplxk9DyK m68pUTIHcZ7IFwQS6tje5bCgPhqW7fxGLBUwTch82s8DUrYhUk0EpMvEl+vhlsDt/vta 8MBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724709427; x=1725314227; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=iXQk85Bz0uWFXImwDI236VG0AVPznx4BEpukyRyLnqU=; b=aNUzPA+xIGrqTKXYDm/4T+x6Zh4knCxq2062vX6BuYPwOoB/D9VTotnvXQ8uT9Stqt +5/Pe8JaZ4uO0kHcL3CPZBEOZi2mg63pEEw2RsCPlqWl7FQe09hp+DkQRWX3xrVC7GW5 B5o7CEWMeBhvSX7biIkbHGlwSx04eT1aiZlLAIR3fClvmzCEw1PrOAFhJesoB2SjsQFm SnHO286kRC1jOkvYU0H3v3ZfQjuKTk+hdmxozrQcVoOzgCBcBI8lR/HFEG7KWG3YJybs psY0YKPl9Bv4NrafoAFvTWou84oFo6v5h2BmlheN8wBUKDRcUF70MmGpvf99afT4gIMH mGNg== X-Gm-Message-State: AOJu0YyRwBV4g3VgRFfSR9wn8oricHV6wqtZrXTtqY6dQeHdblFXWKXH LyKAdCOjiq4DMF8XY39rWlcNHf9V1LOY1A9oJXFNd1WyWhaghbI0eg3EZ8rsZu/AteCFATcVoJo z X-Google-Smtp-Source: AGHT+IEyF1TfNZzW3gdqJGY2Ov3oOkU06Hh5XSbms/pI8yagAdw4OlqWABT2sZEn8XDDylvr4ZPUPw== X-Received: by 2002:a5d:6145:0:b0:371:8e50:2d06 with SMTP id ffacd0b85a97d-3748c81a10amr516830f8f.43.1724709425993; Mon, 26 Aug 2024 14:57:05 -0700 (PDT) Received: from ?IPV6:2a01:4b00:bf09:5101:f1f9:cef9:e305:d7f2? ([2a01:4b00:bf09:5101:f1f9:cef9:e305:d7f2]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3730821a8bcsm11559390f8f.90.2024.08.26.14.57.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 14:57:05 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------Hn0ioFyWqaH4k080SjdQepEA" Message-ID: Date: Mon, 26 Aug 2024 22:57:04 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] Default expression To: internals@lists.php.net References: Content-Language: en-GB In-Reply-To: From: bilge@scriptfusion.com (Bilge) This is a multi-part message in MIME format. --------------Hn0ioFyWqaH4k080SjdQepEA Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 26/08/2024 22:27, Matthew Weier O'Phinney wrote: > Again, there are a few lists going around on this thread, and I hope > that Bilge is taking notes to add to the RFC, and working with the > folks who helped him with implementation to determine what is and is > not possible in terms of the grammar so we can potentially exclude the > more problematic ones. > I am just about to amend the RFC with the major discussion points from detractors, however I am still missing a list of even one item that must absolutely be prohibited, along with an explanation as to why. FWIW, I have had the grand fortune to work with, or receive direct feedback from, some of the most talented PHP heads in the scene (read: engine maintainers) and they (so far) have unanimously confessed they do not see any issue with any permutation of default as an expression. Indeed, the entire point of the expression grammar is they can be composed freely with one another in any way you like; to do otherwise would be radical departure from the intended behaviour. In case it matters, my initial inclination was also to do what some others have suggested, and modify the SEND opcodes so that the default is not actually looked up using reflection at all, but rather we just send nothing to the function and it can use its default as it would normally, but since I had the good sense to ask an engine maintainer how they would approach this problem, they cautioned me that this was the approach Stas took 10 years ago , that that approach was horrendous (paraphrasing) and they would never support something like that (mainly because there's like 11 of them and modifying them all would be a complete mess). So whilst you might find me quite unmoved by some of the arguments put forth on the mailing list and generally difficult to convince, it is not because I am stubborn in my naivete, it is because when wisdom was imparted, I listened. I am but a small man standing on the shoulders of giants. Kind regards, Bilge --------------Hn0ioFyWqaH4k080SjdQepEA Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 26/08/2024 22:27, Matthew Weier O'Phinney wrote:
Again, there are a few lists going around on this thread, and I hope that Bilge is taking notes to add to the RFC, and working with the folks who helped him with implementation to determine what is and is not possible in terms of the grammar so we can potentially exclude the more problematic ones.

I am just about to amend the RFC with the major discussion points from detractors, however I am still missing a list of even one item that must absolutely be prohibited, along with an explanation as to why.

FWIW, I have had the grand fortune to work with, or receive direct feedback from, some of the most talented PHP heads in the scene (read: engine maintainers) and they (so far) have unanimously confessed they do not see any issue with any permutation of default as an expression. Indeed, the entire point of the expression grammar is they can be composed freely with one another in any way you like; to do otherwise would be radical departure from the intended behaviour.

In case it matters, my initial inclination was also to do what some others have suggested, and modify the SEND opcodes so that the default is not actually looked up using reflection at all, but rather we just send nothing to the function and it can use its default as it would normally, but since I had the good sense to ask an engine maintainer how they would approach this problem, they cautioned me that this was the approach Stas took 10 years ago, that that approach was horrendous (paraphrasing) and they would never support something like that (mainly because there's like 11 of them and modifying them all would be a complete mess). So whilst you might find me quite unmoved by some of the arguments put forth on the mailing list and generally difficult to convince, it is not because I am stubborn in my naivete, it is because when wisdom was imparted, I listened. I am but a small man standing on the shoulders of giants.

Kind regards,
Bilge

--------------Hn0ioFyWqaH4k080SjdQepEA--