Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125301 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 EFE671A00BD for ; Tue, 27 Aug 2024 03:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724729960; bh=2aPN17pN0msiL1FbfxEU8VggJw1EhoFsEB0oZSLa36M=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=BiRcGCHgwb/PMBg2VEO9xf1yewWIUvdY6kG7l/s9CpE7bb2FpXjClyS2U2ElSazRm cTYVXxHnvGPkWp2Lqv9ays52uDfydgzN5HZFcVp/AHC18N5tkyUJCrlUodMbk5/Zu4 us9n/KM5gU2CrK5woQiCcHTt3iTIefZ2KB3ntK2YCSU/kLVc/6YV6qkfXXsDt+oPJ5 Z/bJA2BhRzBxQT8grq8QeNdyKhkbqhckjge+NPNBq0NPy/g6sJxFhrnUa0IuSFgC9H OPHBdIr9gMz4IV2JXkISpJqu/U16kP7jrXdi/kR0Y187aw/TxkurKjmZpnS7yP74aR fBHhht9t7k3zw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A1EDC18005B for ; Tue, 27 Aug 2024 03:39:19 +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=4.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RCVD_IN_SBL_CSS,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) (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 ; Tue, 27 Aug 2024 03:39:19 +0000 (UTC) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-6b747f2e2b7so47343457b3.3 for ; Mon, 26 Aug 2024 20:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coggenterprises-com.20230601.gappssmtp.com; s=20230601; t=1724729845; x=1725334645; darn=lists.php.net; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=2aPN17pN0msiL1FbfxEU8VggJw1EhoFsEB0oZSLa36M=; b=LFxl8RaOtcMp/rWvY/OgzXJLat4vsDddPaYwc0t6tD7TmPCJo06PwukWIlkvpref+w CTdqDcMd/XjI5sip0Dugm083c4x9ovB6wvXzIeU06gvBKf3IzM6+ggYsCVUALeYmmxjB ClnElfiImEEVrUDJ09XB7Ng8bZYMb5i2aLxXok2cRvpE+YeJx+ZUazRqoow1twxRVhjW +9N6/zJUgRooiiZR5nDW3WtK3li3q6rjDOLs1tfBrmxtz61LNT+ZMOwMHqOx0+zg9BYk xCmwrks5HB0ZJ/iZRlvuvaFm4T07GcMYAkJAeS7up8AQJv7tF8UhZ6PXT+BAooX2Tejf GCfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724729845; x=1725334645; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2aPN17pN0msiL1FbfxEU8VggJw1EhoFsEB0oZSLa36M=; b=Pl3D9/SP063CeqlxfTSLTGovzI4bU568vbprCWJB4NRR5fTovi/E4RbaZ3v8iREC4T g+z4+fU8vqDxx4vaW9aBnOYtCb8C/mMJTE4O9Ud5LxsTmw3bycGM6ZwjqICpjVA7WWKZ AcTJPQvBGsPSdV8Pe8cOpSst9Sl7In5C28gBtPC5koW7q8OGzIlGJmtbC0c6nduXD7es tXcnrV7yn/1jxAf6m/wl4Oo35vcfQz7NUwq23dcTR8PdTUy6vIuJ8vPWGV1KrMMtaRPZ 5BndeSLcg9sAu+f+YFqSBNmm0cvuf1i3/+WDt0l1LnAjpKw0D0yJ6lBYxMTiRG9wX+sf +gzg== X-Gm-Message-State: AOJu0YwtpTP1i1e4QJKFNIQN/RMlOFCtg4uAcud49BZkgTy9JjITlVtm SRITgT+S0MvlDL0SIDBcGd5nYq2O7OJFL8NhzA0Xl1hKwEQN2+fbuSXCBK9dwHIGe/YpAPnuFzF I X-Google-Smtp-Source: AGHT+IE7PvynpAcXzAwXlR5+Y8N+W75gGlBAPF5pWf8fQ3OR3zh8ltOC0Kz+e3ZHddblM8iCwQcteg== X-Received: by 2002:a05:690c:39d:b0:6c8:e45d:ebd8 with SMTP id 00721157ae682-6c8e45df0c8mr112538367b3.9.1724729845140; Mon, 26 Aug 2024 20:37:25 -0700 (PDT) Received: from Johns-MacBook-Pro-2.local ([207.213.210.67]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6c39a75341csm17733987b3.45.2024.08.26.20.37.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Aug 2024 20:37:24 -0700 (PDT) Date: Mon, 26 Aug 2024 23:37:23 -0400 To: Bilge Cc: "=?utf-8?Q?internals=40lists.php.net?=" Message-ID: In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC] Default expression X-Mailer: Mailspring Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="66cd49f3_74b0dc51_12a23" From: john@coggeshall.org (John Coggeshall) --66cd49f3_74b0dc51_12a23 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Aug 26 2024, at 5:57 pm, Bilge wrote: > 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 (https://github.com/php/php-src/compare/master...smalyshev:php-src:skip_params7), 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 shou lders of giants. > > The RFC for Stas' implementation of default was very different not only in approach, but it was put forth at a different time to solve a different problem. I don't think it makes sense to conflate the two issues. Very importantly Stas was not proposing an expression syntax that increased visibility and access into function declaration defaults as you are proposing. https://wiki.php.net/rfc/skipparams > 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. I've seen multiple explanations by many and I know I personally put a code example forth. I am not sure what prompts you to say that. I'd be very interested in hearing from you, as the RFC author, specifically about that code example -- and why you believe the issue I described is worth the cost. > 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. I think what has been lost in this conversation is that the "detractors" believe the intended behavior is not a good direction to take the language. It seems to me that we simply don't think default parameters should be directly accessible to the caller in a major percentage of the circumstances. Any discussion about expression restrictions or the like has only happened because those same detractors are offering potential compromise ideas. The fundamental problem with the RFC to me is that it's creating an access into function declarations that IMO is neither needed or wise. Coogle --66cd49f3_74b0dc51_12a23 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

On Aug 26 2024, at= 5:57 pm, Bilge <bilge=40scriptfusion.com> wrote:
=
In case it matters, my initial in= clination was also to do what some others have suggested, and modify the = SEND opcodes so that the default is not actually looked up using reflecti= on 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 appro= ach Stas took 10 years ago, that that approach was horrendous (paraph= rasing) 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 f= orth on the mailing list and generally difficult to convince, it is not b= ecause I am stubborn in my naivete, it is because when wisdom was imparte= d, I listened. I am but a small man standing on the shoulders of giants.<= /div>


The R=46C for Stas' implementation o= f default  was very different not only in approach, but= it was put forth at a different time to solve a different problem. I don= 't think it makes sense to conflate the two issues. Very importantly Stas= was not proposing an expression syntax that increased visibility and acc= ess into function declaration defaults as you are proposing.

https://wiki.php.net/rfc/skipparams
I am just about to amend the R=46C with the major disc= ussion 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.

I've seen multiple explanations by many and= I know I personally put a code example forth. I am not sure what prompts= you to say that.

I'd be very interested in hearing from yo= u, as the R=46C author, specifically about that code example -- and why y= ou believe the issue I described is worth the cost.

= Indeed, the enti= re point of the expression grammar is they can be composed freely with on= e another in any way you like; to do otherwise would be radical departure= from the intended behaviour.

I think what has been lo= st in this conversation is that the =22detractors=22 believe the intended= behavior is not a good direction to take the language. It seems to me th= at we simply don't think default parameters should be directly accessible= to the caller in a major percentage of the circumstances. Any discussion= about expression restrictions or the like has only happened because thos= e same detractors are offering potential compromise ideas. The fundamenta= l problem with the R=46C to me is that it's creating an access into funct= ion declarations that IMO is neither needed or wise.
<= br>
Coogle

--66cd49f3_74b0dc51_12a23--