Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125352 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 D8B631A00BD for ; Thu, 29 Aug 2024 22:04:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724969177; bh=9SM5bOmuwDHCLNZzfqPYhbZlX/FOJIdK59g1WY+j5J8=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=lK4KhWaj0UmIj/iLS83X5DNBLJ1bNxSKRwE7Tu6Tsws9193egkBbdt3Ohxp6GddvN 2Fld8Q8/n4+qj80S3oLZFDNaBm/Gm4saFCYuR2DkboLnL603Fn1craxKjy3JHukCFk VgiQRNBkgcHVpSTtMiXtoV5bAdsL0oipce6c/s8u0AMKEHOXj9x8WMJhZeyLxN4Asl XYupjt0YNMGjOF0s/nn133Rbai5eEkk34RNagT5u9Mqc3Fc/VoY6+bHHPOOlDOKfwG TImPS7ZGeAsa/caJlTOrYqC2BPMP8xjcaHk4wq5yvO7s2A5EE4eQMqG9Et3vDRJGtn jDZINARPy4chg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9BF8A1801EC for ; Thu, 29 Aug 2024 22:06:14 +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-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 ; Thu, 29 Aug 2024 22:06:10 +0000 (UTC) Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3df121f7088so90056b6e.2 for ; Thu, 29 Aug 2024 15:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coggenterprises-com.20230601.gappssmtp.com; s=20230601; t=1724969055; x=1725573855; 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=9SM5bOmuwDHCLNZzfqPYhbZlX/FOJIdK59g1WY+j5J8=; b=Xh5e+WYNPMBXzeYIzN5bcZOYKJF9IoT/Sl0uQsrGzw3ddMRRqKhmM9xEREXargwViQ C7kLtWgZm+BnHj57SzQA217Qrk69di5tlyfB97fLV4lrW2/vZLe28sWuxdX+42kD7LhN W1KJ9lnhYhTWkmzPhf4YkP8qA4p54KOHghQ2YVSKl3WwyAEwx5BTKqpkS6XXshb2P4YV iXbcCiZpik/uStBnmW12fAr0SZfH01B2XyakxBVzQJtKFCwLMFc0RkAN7XKAtG7EBoqy UYnGzyMKwy/pv3RK8tFAX59GWxfpcuRStrgeUeER6leBLXU0CV7axFd7O6o6DvJM9hBS yrOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724969055; x=1725573855; 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=9SM5bOmuwDHCLNZzfqPYhbZlX/FOJIdK59g1WY+j5J8=; b=wPWTFI287W5x+m0qS52lzXBnkCYdFxvUEyoRCX745D+91tjIGW+4wUaS2X79Ql3vGz oiZzDZwqDoa1ctR/slKS6/Xsc6/KnYMgz9jfWcGkkx4p3Uz0FFNWYisRyHY/g8D8F0lH bUmrvNc2l5jxwuFqZ446mIDrFVun9v6hObV5NMlPMlebp4CIWGEAo8tbuOYDvCNbjLIc 00575uuW0XeAiwzOeR+dWOJ7jjNdGuW613bAnglgPI6OBOQpA97bEfAGg9n4+YaVXa1J UAjUmLYXCJkYDYFVhiOiH4rMw0tE0SQUkJNeYJ8tQv/n7RKb8ZuA9f7SlKScgcHlDWHD VAIQ== X-Gm-Message-State: AOJu0Yz8qE/Qd719K4jbAQLBx6MxInK3xfvAaGbm7tlPvQa3iJmRV0j5 f9Brcfj9BWY29bY5YqGeCupKzqXhBvT+whdQkenCkrNv18PR+MQgj69Ml/q0ophjjXCqwMmXPir W X-Google-Smtp-Source: AGHT+IFEDRUA8PvnYJjtR+xPmrlY3nCXUT3tEo5/4hzMjBidH1RpOM1gLTovbIrhlTA7BeAtaQ50mw== X-Received: by 2002:a05:6808:16aa:b0:3d9:2def:21b4 with SMTP id 5614622812f47-3df05d59428mr3802202b6e.14.1724969054507; Thu, 29 Aug 2024 15:04:14 -0700 (PDT) Received: from Johns-MacBook-Pro-2.local ([207.213.210.67]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3df11884b5asm107193b6e.51.2024.08.29.15.04.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Aug 2024 15:04:14 -0700 (PDT) Date: Thu, 29 Aug 2024 18:04:12 -0400 To: Bilge Cc: "=?utf-8?Q?internals=40lists.php.net?=" Message-ID: <8BFBC80D-589E-4297-A019-031B6D121F3A@getmailspring.com> In-Reply-To: References: Subject: Re: [PHP-DEV] Re: [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="66d0f05c_643c9869_129d4" From: john@coggeshall.org (John Coggeshall) --66d0f05c_643c9869_129d4 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline One thought re-reading the RFC. abstract class Theme { public function bar(); } class CuteTheme extends Theme { public function foo(); } class Config { public function __construct(Theme $theme = new CuteTheme()) {} } $a = new Config(default->foo()); In the proposed (updated) RFC would this be proposed to work? If so this should be added to the discussion section as something I think is equally as problematic as union types. I don't think saying "Union and Mixed" is broad enough. In this case it would actually have to only allow Theme (whatever that was) and prevent you from calling foo() because that isn't a member of Theme . Otherwise it's the same problem as union types in a different color. Coogle On Aug 29 2024, at 5:52 pm, Bilge wrote: > Hi gang, > > On 24/08/2024 17:49, Bilge wrote: > > > > New RFC just dropped: https://wiki.php.net/rfc/default_expression. I > > think some of you might enjoy this one. Hit me with any feedback. > > > Now the dust has settled, I've updated the RFC to version 1.1. The > premise of the RFC is unchanged, but the proposal has been expanded and > a discussion section added to summarise the ~100 message thread to > capture the major concerns raised in a condensed format. I hope I've > done a good job of fairly and accurately representing your concerns, but > if not please correct me. > > Furthermore, a secondary vote has been added. The secondary vote will be > open to all (whether in favour or against the proposal) to capture > alternative implementations you might also be in favour of. If the > primary vote passes, the secondary vote won't matter, but otherwise it > may help guide our sails in future. > > Kind regards, > Bilge > --66d0f05c_643c9869_129d4 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
One thought re-reading the R=46C.

abstract class Theme= =7B
         public fu= nction bar();
=7D

class CuteTheme extends Theme =7B=
       public function foo();
=7D

class Config =7B
    p= ublic function =5F=5Fconstruct(Theme =24theme =3D new CuteTheme()) =7B=7D=
=7D

=24a =3D new Config(default->foo());
In the proposed (updated) R=46C would this be proposed to work=3F= If so this should be added to the discussion section as something I thin= k is equally as problematic as union types. I don't think saying =22Union= and Mixed=22 is broad enough. In this case it would actually have to onl= y allow Theme  (whatever that was) and prevent you from= calling foo()  because that isn't a member of Th= eme . Otherwise it's the same problem as union types in a dif= ferent color.

Coogle

On Aug 29 2024, at 5:52 pm, Bilge <bilge=40scriptfus= ion.com> wrote:
Hi gang,

On 2= 4/08/2024 17:49, Bilge wrote:
>
> New R=46C jus= t dropped: https://wiki.php.net/rfc/default=5Fexpression. I
>= ; think some of you might enjoy this one. Hit me with any feedback.
=
>
Now the dust has settled, I've updated the R=46C to v= ersion 1.1. The
premise of the R=46C is unchanged, but the prop= osal has been expanded and
a discussion section added to summar= ise the =7E100 message thread to
capture the major concerns rai= sed in a condensed format. I hope I've
done a good job of fairl= y and accurately representing your concerns, but
if not please = correct me.

=46urthermore, a secondary vote has been added.= The secondary vote will be
open to all (whether in favour or a= gainst the proposal) to capture
alternative implementations you= might also be in favour of. If the
primary vote passes, the se= condary vote won't matter, but otherwise it
may help guide our = sails in future.

Kind regards,
Bilge
<= /blockquote> --66d0f05c_643c9869_129d4--