Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106854 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 12626 invoked from network); 4 Sep 2019 15:49:42 -0000 Received: from unknown (HELO mail-ed1-f43.google.com) (209.85.208.43) by pb1.pair.com with SMTP; 4 Sep 2019 15:49:42 -0000 Received: by mail-ed1-f43.google.com with SMTP id i8so8676200edn.13 for ; Wed, 04 Sep 2019 06:23:37 -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=H7Flzkj78PsmTnrIju497Bi7Z6pWkD0YIsrSDPnl4vM=; b=LTM/mtOeZm1UaJf5wqZPZILCnmzcbewq5v8sNKRL89gm6fyNiFwZCjGr57NmvpuSkb tBLZMkeQK2qAbacIFfcLZsvc+eH7EvSX+bcfObZZGf6qMDCLyveGOKYt9Qjy3PlnD4Yh 8IJUBdMHtSH/DdeGycG2x8Z8Fd7KP0SgeZeUbQttRisJdQuE0/o1ttaOK3m6ItSiPYK9 bZsm/15wA7af9KpQBeN+HgbPK4MWgyGaeny5YmtCP1AmVk+qyko8hUCWo2MvunxGAgAB KSoUcPc7fwivQhDgeHtE6be9QVe6VQ5GDrd1Bv5vF3dNsCvhiqpnUySxeRudPy8tnnq6 Z1Qg== 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=H7Flzkj78PsmTnrIju497Bi7Z6pWkD0YIsrSDPnl4vM=; b=qO/qaEbMNLKSWWKQqju3JIF+xWsbxWDCO8OaS+zM8zDjohMq1CDEtL0Qsd7vfYdpCD oZuja+KB5m0S4GaK0XTtmVAq03wdUejv0WXwKydHT5Q6aSyVxSVob8fxgbrU1MwwzC/2 8jyr7Zp2KZxAvU/k1MWSs33Ge/RdY/6jUkVy16RVbN54AcvLDZNPDZv75srG991V7QJr 78fPNFUTHvgLGLJASis5Gp17CF9lkvrhN5hSI8fwlRqe0bdLNEzaLI/ljGOd4GWmg9L3 wTco0wkm7HE3hIsgOrLQM9UGV25gNmP525kUBq+TWQD6LQS8T2oefybYFzwoG5ssXMo7 s4Rw== X-Gm-Message-State: APjAAAUTHtsWKyV41vxLw578SsoB8m8C6oHJk6sn8NYmsI8kAGwzoK+z C/oN5ziDnG/P2t35MJvHydc= X-Google-Smtp-Source: APXvYqyPqhVk0/pSsDsftY6j0BY/Kc3VVz6zPhTISONkYXpldvrQ+dRiT5jnEcKBEWD8lT26YDUz8Q== X-Received: by 2002:a50:c10a:: with SMTP id l10mr14806806edf.79.1567603416966; Wed, 04 Sep 2019 06:23:36 -0700 (PDT) Received: from [192.168.0.63] (84-75-30-51.dclient.hispeed.ch. [84.75.30.51]) by smtp.gmail.com with ESMTPSA id rh20sm934117ejb.39.2019.09.04.06.23.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Sep 2019 06:23:36 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_16F0F070-1790-4D2F-8C73-140279DE7A19" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Wed, 4 Sep 2019 15:23:35 +0200 In-Reply-To: Cc: Nicolas Grekas , arnold.adaniels.nl@gmail.com, Nikita Popov , PHP internals To: Dan Ackroyd References: X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] [RFC] Union Types v2 From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_16F0F070-1790-4D2F-8C73-140279DE7A19 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 4 sept. 2019 =C3=A0 13:54, Dan Ackroyd a = =C3=A9crit : >=20 >>=20 >> if we were to use "?int" instead, the engine would force the >> community to add "return null;" >=20 > That sounds like a bug to me. The fact that null is returned by any > function that lacks an explicit return value, is well-defined, and one > of the most underrated aspects of PHP imo. >=20 This is an aspect of the eternal debate between explicit vs. implicit. = In another recent thread, another aspect, namely variable = initialisation, was debated. There is no =E2=80=9Ccorrect=E2=80=9D = solution, as it pertains much to coding style. =E2=80=94Claude= --Apple-Mail=_16F0F070-1790-4D2F-8C73-140279DE7A19--