Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109636 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 36364 invoked from network); 14 Apr 2020 17:36:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Apr 2020 17:36:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5F48A180549 for ; Tue, 14 Apr 2020 09:06:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 14 Apr 2020 09:06:33 -0700 (PDT) Received: by mail-wr1-f46.google.com with SMTP id t14so1754930wrw.12 for ; Tue, 14 Apr 2020 09:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=UdpmGjYYUYU8iehhDUWpSM3kCyFZgjblLgtXJn3GrPM=; b=up1qlj1/0gnIEs9RuOtfILXFsN7ZBw2fBy/EP8uZL2EkwE7SxJdT8+BcR5WTbyGDNi iB5Ph52e3jpQ/18r13rMK0TUBkMWINe6XIkcmta7xpYTzKGWeWbkM5/QL/pIfDEEVcz7 Ok30+VbiqFLE/uRdDZlitfEV15h1i9RD1yZvI12jlCE17VHD6yKMSN25xpQdYhcseJMZ uYNDYvmqRHLsdsjjqaObLIZTDW2AyVaq5c9alxPgUKChpfE6aBgEVkP3rCRmJBmKyRLj MGLxjUpWQzXJsrTw+Bo5Owo4MOIfvAlWFV7nbum9fU5+NHUQ83kPhTJRxEPUaRMIWgxD Zwtw== 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=UdpmGjYYUYU8iehhDUWpSM3kCyFZgjblLgtXJn3GrPM=; b=esyRzTlAq25zIybRXM7krF2kiH1wQcurbm6Vm5WckGBphhvrtoFcXS9GuoEj03DZVv qgnPi2V5c/6wZDRX41RonkO+pst15315U9pcCqloi4DjixvUHm5b4asPtG8WRsjd4zcF Sq72IXnqlD4IPFrFrBCsXT+xqqgehktLy5o5pWuLLDuo7s2JtvZUFlwm1fDyMfL5N3S3 xN6p3zIGTh7P5QR0vm6nZ2Y11E81zOXT7z40U3knaeZwVyMTvTYdqM1MUxGjQXnbA7nq JTt+fE+rAFqBKjAQhDeHAjacXLIy9TuYsGla8svHReHRiNN26QgVDjQnkfauUU2BFD5X xiFA== X-Gm-Message-State: AGi0PuaWSVRk9uNQv0MkwI74UcJPW9MRJwdUfKZe4gz6gkt7Z1SSQtcy Dojw1E8Hf/TaBmB7Tv6GRnw= X-Google-Smtp-Source: APiQypKXrgkMr9Fw3Z9L5mIc+5kFjN4/L2RecLWXKUTVdybs5ropD5KYGcPIr9G2rzCn20kKo+0wig== X-Received: by 2002:adf:eb88:: with SMTP id t8mr23965456wrn.224.1586880392766; Tue, 14 Apr 2020 09:06:32 -0700 (PDT) Received: from claude.fritz.box ([185.71.12.64]) by smtp.gmail.com with ESMTPSA id m15sm18743699wmc.35.2020.04.14.09.06.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Apr 2020 09:06:31 -0700 (PDT) Message-ID: <0A374409-6FA6-4E02-A7E6-EACA3E42451C@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_3CF1C0AF-5D08-45F3-AB75-D5194E1D1D68" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Date: Tue, 14 Apr 2020 18:06:30 +0200 In-Reply-To: Cc: Gabriel Caruso , PHP Internals To: Nicolas Grekas References: <90F4B395-F010-4196-9C40-7896D4F3F2F4@gmail.com> X-Mailer: Apple Mail (2.3608.80.23.2.2) Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Ensure correct magic methods' signatures when typed From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_3CF1C0AF-5D08-45F3-AB75-D5194E1D1D68 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 14 avr. 2020 =C3=A0 16:54, Nicolas Grekas = a =C3=A9crit : >=20 > I'm just not sold on allowing "void" on __construct, because the very = concept of a return type on a constructor is ... void, and also because = of the code style choices this will open (and the CS "wars" I = mentioned). >=20 This issue is not specific to magic method like __construct(). It is the = whole concept of =E2=80=9Cvoid=E2=80=9D as return type which is, say, = =E2=80=9Cproblematic=E2=80=9D. In fact, =E2=80=9Cvoid=E2=80=9D is not really a return type. It is a way = to state that the method is not supposed to return anything, which = means, as you said very well, that =E2=80=9Cthe very concept of return = type on [this method] is void=E2=80=9D. That might be a reason to reject the concept of =E2=80=9Cvoid=E2=80=9D = as return type. Or to revive = https://wiki.php.net/rfc/allow-void-variance = . But again, the issue is = orthogonal to the fact that this particular method is magic, and we = should not cherry-pick and reject the concept of =E2=80=9Cvoid=E2=80=9D = for __construct() and similar magic methods only. =E2=80=94Claude --Apple-Mail=_3CF1C0AF-5D08-45F3-AB75-D5194E1D1D68--